strategy design pattern
define a family of algorithms, encapsulate each one, and make them interchangeable. strategy lets the algorithm vary independently from clients that use it.
Decorator Design Pattern
wrapper code to extend core code. A class will add functionality to another class, without changing the other classes’ structure.
Design Principle
Classes should be open for extension, but closed for modification.
Factory Method Design Pattern
a factory method defines functions must be available in the non-abstract or concrete factory. These functions must be able to create objects that are extensions of a specific class. Which exact subclass is created will depend on the value of a parameter passed to the function.
We can create a factory to avoid always call same class. The factory pattern encapsulates the creation of objects.
Observer Design Pattern
Parallel Notify
Chain of Responsibility Design Pattern
A method called in one object will move up a chain of objects until one is found that can properly handle the call.
Singleton Design Pattern
Flyweight Design Pattern
Adapter Design Pattern
fix the interface better objects and classes; connect interface of class into another interface.
a class converts the interface of one class to be what another class expects.
Facade Design Pattern
a simpler interface to a larger, complex system
Template Method Design Pattern
Iterator Design Pattern
provide access to the elements of collection
Composite Design Pattern