jobo: public protected and private in javascript

Beitrag lesen

Hallo,

Fand bei Wikipedias Protypeartikel eigentlich eine gute Zusammenfassung dieser Diskussion (;-):

"Advocates of class-based object models who criticize prototype-based systems often have concerns that could be seen as similar to those concerns that proponents of static type systems for programming languages have of dynamic type systems (see datatype). Usually, such concerns involve: correctness, safety, predictability, efficiency and programmer unfamiliarity.

On the first three points, classes are often seen as analogous to types (in most statically typed object-oriented languages they serve that role) and are proposed to provide contractual guarantees to their instances, and to users of their instances, that they will behave in some given fashion.

Regarding efficiency, declaring classes simplifies many compiler optimizations that allow developing efficient method and instance variable lookup. For the Self language, much development time was spent on developing, compiling, and interpreting techniques to improve the performance of prototype-based systems versus class-based systems. For example, the Lisaac compiler produces code almost as fast as C. Tests have been run with an MPEG-2 codec written in Lisaac, copied from a C version. These show the Lisaac version is 1.9% slower than the C version with 37% fewer lines of code.[5]

A common criticism made against prototype-based languages is that the community of software developers is unfamiliar with them, despite the popularity and market permeation of JavaScript. This knowledge level of prototype-based systems seems to be changing with the proliferation of JavaScript frameworks and increases in the complex use of JavaScript as "Web 2.0" matures."

Gruß

jobo

0 112

public protected and private in javascript

Florian Bücklers
  • javascript
  1. 0
    Struppi
    1. 0
      jobo
      1. 0
        jobo
      2. 0
        Florian Bücklers
        1. 1

          Standortbestimmung: Programmierparadigmen, OOP, OOP in JS ...

          peterS.
          1. 0
            Florian Bückkers
            1. 0
              peterS.
              1. 0
                jobo
              2. 0
                Florian Bücklers
              3. 2
                peterS.
                1. 0
                  peterS.
            2. 3
              molily
      3. 0
        molily
        1. 0
          jobo
  2. 1
    Struppi
    1. 0
      Florian Bücklers
  3. 2
    molily
    1. 0

      javascripts oop und ein beispiel

      jobo
      1. 0
        Struppi
    2. 1
      Florian Bücklers
      1. 1
        molily
        1. 0
          Struppi
          1. 1
            molily
            1. 0
              Struppi
              1. 0
                jobo
                1. 0
                  Struppi
              2. 1
                molily
                1. 0
                  Struppi
                  1. 0
                    molily
                    1. 0
                      Struppi
                      1. 0
                        jobo
                        1. 0
                          Struppi
                          1. 0
                            jobo
                          2. 1
                            molily
                            1. 0
                              jobo
                              1. 0
                                jobo
                  2. 1
                    molily
                2. 0
                  Florian Bücklers
                  1. 0
                    jobo
                    1. 0
                      Struppi
                      1. 0
                        jobo
                        1. 0
                          Struppi
                          1. 0
                            jobo
                            1. 0

                              was ist OOP und gibt es eine Implementation in Ecmascript

                              jobo
                            2. 0

                              OOP in Javascript - Object prototypisch erweitern

                              jobo
                            3. 0
                              Struppi
                              1. 0
                                jobo
                                1. 0

                                  protected und Javascript - übergeordnetes (Sicherheits-)Konzept

                                  jobo
                                2. 0
                                  Struppi
                                  1. 0
                                    jobo
                                    1. 0

                                      Diskussionszusammenfassung auf Wikipedia

                                      jobo
                                      1. 0
                                        Struppi
                                        1. 2
                                          molily
                                          1. 0

                                            Diskussionszusammenfassung von molily und node.js

                                            jobo
                                            1. 0
                                              Struppi
                                              1. 0

                                                der Punkt um den es geht ... Privatheitskonzept von Javascript

                                                jobo
                                                1. 0
                                                  Struppi
                                                  1. 0
                                                    jobo
                                                  2. 0

                                                    serverseitiges Javascript - node.js

                                                    jobo
                                                    1. 0
                                                      peterS.
                                                  3. 0

                                                    mitlesender

                                                    peterS.
                                                    • menschelei
                                                    1. 0
                                                      JürgenB
                                            2. 0
                                              molily
                                              1. 0

                                                Diskussionszusammenfassung von molily, node.js und loops

                                                jobo
                      2. 2
                        molily
                        1. 0
                          Struppi
                          1. 0

                            Privatheitskonzept in Javascript

                            jobo
                            1. 0
                              Struppi
                          2. 0
                            molily
                            1. 1
                              molily
                          3. 0
                            jobo
                            1. 0

                              Codereuse und DesignPatterns OOP ohne Vererbung und POO

                              jobo
                              1. 0
                                JürgenB
                                1. 0
                                  jobo
                          4. 0
                            Don P
                            1. 0

                              privat und (pseudo-)"Klassen" - Prototype und Scopevariablen

                              jobo
                              1. 0
                                Don P
                                1. 0
                                  Struppi
                                  1. 0
                                    Don P
                                    1. 0
                                      Struppi
                                      1. 0
                                        Don P
                                        1. 0
                                          Struppi
                                          1. 0

                                            Konstruktor-Closure vs. Prototyp

                                            molily
                                            1. 0
                                              jobo
                                          2. 0
                                            jobo
                                            1. 0
                                              jobo
                                            2. 0
                                              Struppi
                                              1. 0
                                                jobo
                                                1. 0

                                                  Crockfords "module pattern" - unabhängig von YUI(YAHOO)

                                                  jobo
                                                2. 0
                                                  peterS.
                                                  1. 0
                                                    jobo
                                                    1. 0
                                                      Struppi
                                                      1. 0
                                                        jobo
                                                        1. 0
                                                          Struppi
                                                          1. 0

                                                            Performance und "this" im Kontruktor

                                                            jobo
                                                            1. 0
                                                              Struppi
                                                              1. 0
                                                                jobo
                                                                1. 0
                                                                  Struppi
                                                                  1. 0
                                                                    jobo
                                                  2. 0
                                                    Don P
                                                    1. 0

                                                      private mit "revealing module patter" und "speaking code"

                                                      jobo
                                                    2. 0
                                                      Struppi
                                    2. 0
                                      jobo
                                      1. 0
                                        Struppi
                                        1. 0
                                          jobo
                            2. 0
                              Struppi
                  2. 1
                    molily
            2. 0
              jobo
              1. 2
                molily
              2. 1
                molily
                1. 0
                  jobo