Design Patterns


Design Patterns are well described solution to a common software problem.

Some of the benefits of using design patterns are:

  1. Pre-defined providing industry standard approach to solve a recurring problem, so it saves time to use design pattern.
  2. Usage promotes reusability that leads to more robust and highly maintainable code.
  3. Since design patterns are already defined, it makes our code easy to understand and debug. It leads to faster development and new members of team understand it easily.

Types

  • Creational Design Patterns provide solution to instantiate an object in the best possible way for specific situations.
    1. Singleton Pattern
    2. Factory Pattern
    3. Abstract Factory Pattern
    4. Builder Pattern
    5. Prototype Pattern
  • Structural Design Patterns provide different ways to create a class structure, for example using inheritance and composition to create a large object from small objects.
    1. Adapter Pattern
    2. Composite Pattern
    3. Proxy Pattern
    4. Flyweight Pattern
    5. Facade Pattern
    6. Bridge Pattern
    7. Decorator Pattern
  • Behavioral Design Patterns provide solution for the better interaction between objects and how to provide lose coupling and flexibility to extend easily.
    1. Template Method Pattern
    2. Mediator Pattern
    3. Chain of Responsibility Pattern
    4. Observer Pattern
    5. Strategy Pattern
    6. Command Pattern
    7. State Pattern
    8. Visitor Pattern
    9. Interpreter Pattern
    10. Iterator Pattern
    11. Memento Pattern