Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
Story:
Useful lesson I learned in a JavaScript book:
"Classes are abstract data types in the sense that they are a layer around the complexity (encapsulation). Their singular nature allows them to be reused without being rewritten everywhere.
A good analogy is thinking of classes as appliances; the complex circuitry and components that an appliance comprises of are made by different people than the abstract shell around these components, of which (another) team only needs to know which buttons to access which parts.
A class abstracts away the internal complexity (components) and only exposes a public interface (the buttons) that the user (yet another group, comparable to the consumer of the class) is going to use."
It reminds me of how Google uses the Facade pattern to only expose the search box and the button as its public interface and all the complex architecture is hidden away.
This helped clarify classes better for me.
rant
javascript
classes
understanding