Skip to content

Latest commit

 

History

History
36 lines (30 loc) · 1.22 KB

README.md

File metadata and controls

36 lines (30 loc) · 1.22 KB

design-patterns

programs on design patterns

Creational patterns ->

  1. Factory Method : separate a simple logic required for creation of object into a factory method
  2. Abstract Factory : factory of factories
  3. Builder : prevent constructor pollution
  4. Prototype :
  5. Singleton : make one and only one object

Structural patterns ->

  1. Adapter : make two incompatible interfaces compatible
  2. Bridge :
  3. Composite :
  4. Decorator : decorate the object without going suffering the class explosion
  5. Facade : hide complex sub-system and provide the outer interface to the client
  6. Flyweight :
  7. Proxy : rather than providing original class/implementation to the client, provide a proxy class which adds some additional/necessary features to the original class.

Behavirol patterns ->

  1. Chain of Responsibility :
  2. Command :
  3. Iterator : iterate through all the elements without knowing the interal implementation
  4. Mediator :
  5. Memento :
  6. Observer : like subject notifying all its observers whenever its state changes
  7. Visitor :
  8. Strategy : make your strategy at run time and pass the required object
  9. State :
  10. Template Method :