Skip to content

A small gallery of object-oriented features and techniques

Notifications You must be signed in to change notification settings

dgmd/oo-gallery

Repository files navigation

A gallery of object-oriented design

In analogy to the introductory HTML/CSS/JS screencast and the gallery of basic effects we put together, this repository is a small gallery of basic, object-oriented behaviors and effects.

You can read more about the approach and technical aspects of what's entailed in Eloquent JavaScript — and on Mozilla's Developer Network.


  1. raw.html — A raw example of something that's kind of painful without object-orientation.

  2. class.html — The simplest definition of a class, making raw.html a little less painful.

  3. methodsAndAttributes.html — Adding custom methods ('verbs' your objects can do) and attributes ('nouns' your object has).

  4. defineProperty.html — Adding custom 'getters' (functions which return an attribute) and 'setters' (functions which set an attribute) using Object.defineProperty.

  5. eventCommunication.html — Using custom events to communicate between objects.

  6. subclassing.html — Composing and combining classes.

  7. mvc.html — Roughly refactoring our demo to use the "Model-View-Controller" pattern

About

A small gallery of object-oriented features and techniques

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages