Scaling API-first – The story of a global engineering organization
Object Oriented JavaScript
1. Object Oriented JavaScript JavaScript is one of the cornerstones to the powerful set of tools made available by HTML5 JavaScript is a flexible and expressive language that should be written clearly and concisely. Embrace the principles of OO design and how prototypical languages like JavaScript fit into this paradigm.
I threw the HTML5 logo on here because I feel that JavaScript is one of the key cornerstones to the powerful set of tools available. It is becoming more important to write excellent, clear, and concise JavaScript code. We need to embrace the principles of OO design and prototypical languages like JavaScript fit into this paradigm.
Arrow One: Typical instance based "constructor". Define properties which are private and not visible to the outside world. Encapsulation! Arrow Two: Note the "prototype" keyword. Used to add methods to our Product prototype object. Using the internal properties to define the method output. Arrow Three: Instantiation with the "new" keyword. Invocation of the display instance method.
Arrow One: Use of composition with the PriceManager. Proper responsibility has been delegated to the appropriate object. Definition of a private method.
Arrow One: More use of the word prototype for inheritance. Inheritance is a bit clunky but can be simplified by creating a simple helper library to facilitate the mechanism. __proto__ vs. prototype
Arrow One: We overrode the description method, but we the rest of the implementation from the prototypical parent objects.
Arrow One: We overrode the description method, but we the rest of the implementation from the prototypical parent objects.
Arrow One: Typical instance based "constructor". Define properties which are private and not visible to the outside world. Encapsulation! Arrow Two: Note the "prototype" keyword. Used to add methods to our Product prototype object. Using the internal properties to define the method output. Arrow Three: Instantiation with the "new" keyword. Invocation of the display instance method.
Arrow One: We overrode the description method, but we the rest of the implementation from the prototypical parent objects.
Arrow One: We overrode the description method, but we the rest of the implementation from the prototypical parent objects.
Arrow One: We overrode the description method, but we the rest of the implementation from the prototypical parent objects.