Design Patterns
Design Patterns are well described solution to a common software problem.
Some of the benefits of using design patterns are:
- Pre-defined providing industry standard approach to solve a recurring problem, so it saves time to use design pattern.
- Usage promotes reusability that leads to more robust and highly maintainable code.
- 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.
- Singleton Pattern
- Factory Pattern
- Abstract Factory Pattern
- Builder Pattern
- 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.
- Adapter Pattern
- Composite Pattern
- Proxy Pattern
- Flyweight Pattern
- Facade Pattern
- Bridge Pattern
- Decorator Pattern
- Behavioral Design Patterns provide solution for the better interaction between objects and how to provide lose coupling and flexibility to extend easily.
- Template Method Pattern
- Mediator Pattern
- Chain of Responsibility Pattern
- Observer Pattern
- Strategy Pattern
- Command Pattern
- State Pattern
- Visitor Pattern
- Interpreter Pattern
- Iterator Pattern
- Memento Pattern