JavascriptDesignPatterns
javascript design patterns
Install / Use
/learn @LukeLin/JavascriptDesignPatternsREADME
JavascriptDesignPatterns
Javascript design patterns
some collected JS design patterns learning.
<b>Creational Patterns</b> <br><br> <b>Abstract Factory</b> Creates an instance of several families of classes<br> <b>Builder</b> Separates object construction from its representation<br> <b>Factory Method</b> Creates an instance of several derived classes<br> <b>Prototype</b> A fully initialized instance to be copied or cloned<br> <b>Singleton</b> A class of which only a single instance can exist<br>
<b>Structural Patterns</b><br><br> <b>Adapter</b> Match interfaces of different classes<br> <b>Bridge</b> Separates an object’s interface from its implementation<br> <b>Composite</b> A tree structure of simple and composite objects<br> <bDecorator></b> Add responsibilities to objects dynamically<br> <b>Facade</b> A single class that represents an entire subsystem<br> <b>Flyweight</b> A fine-grained instance used for efficient sharing<br> <b>Proxy</b> An object representing another object<br>
<b>Behavioral Patterns</b><br><br> <b>Chain of Resp.</b> A way of passing a request between a chain of objects<br> <b>Command</b> Encapsulate a command request as an object<br> <b>Interpreter</b> A way to include language elements in a program<br> <b>Iterator</b> Sequentially access the elements of a collection<br> <b>Mediator</b> Defines simplified communication between classes<br> <b>Memento</b> Capture and restore an object's internal state<br> <b>Observer</b> A way of notifying change to a number of classes<br> <b>State</b> Alter an object's behavior when its state changes<br> <b>Strategy</b> Encapsulates an algorithm inside a class<br> <b>Template Method</b> Defer the exact steps of an algorithm to a subclass<br> <b>Visitor</b> Defines a new operation to a class without change<br>
