Modern JavaScript Patterns

In recent years, numerous Modern Design Patterns have evolved allowing JavaScript developers to build more effective and maintainable web apps.

This section reviews these Modern Design Patterns that are used by expert JavaScript developers.





  Modern Patterns
   Introduction Introduction to Modern JavaScript Patterns
   Constructor Alternative ways to create new object instances
   Namespace Creates a structure to avoid name collisions
   Module Organizes programs in logical and functional units   --   Module, Revealing Module, Partial Module
   Chaining Enables calling multiple methods on a single object
   Invocation Alternative ways to invoke a function or a method   --   Function, Method, Constructor, Apply
   Mixin A way to dynamically add functionality to an object   --   Prototypal Inheritance, Mixin, Extend, Functional Extend
   Monkeypatch Changes an object without affecting the original code
   Lazy Load Loads data or code only when absolutely necessary   --   Lazy Initialization, Ghost
   Multiton Limits the number of object instances that can be created
   Partial Techniques to load or run constructs only partially   --   Partial Method, Partial Object