What are Design Patterns?
Design patterns are general reusable solutions to common problems that occur in software design. They are not a finished design that can be transformed directly into code. They are a description or template for how to solve a problem that can be used in many different situations.
Types of Design Patterns
Design patterns can be classified into three categories:
- Creational Patterns: TProvide various object creation mechanisms, which increase flexibility and reuse of existing code.
- Structural Patterns: Explain how to assemble objects and classes into larger structures while keeping these structures flexible and efficient.
- Behavioral Patterns: Concerned with algorithms and the assignment of responsibilities between objects.
List of Design Patterns
- Creational Patterns
- Singleton
- Factory Method
- Abstract Factory
- Builder
- Prototype
- Structural Patterns
- Adapter
- Bridge
- Composite
- Decorator
- Facade
- Flyweight
- Proxy
- Behavioral Patterns
- Chain of Responsibility
- Command
- Iterator
- Mediator
- Memento
- Observer
- State
- Strategy
- Template Method
- Visitor
References
- Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
- Head First Design Patterns by Eric Freeman, Elisabeth Robson, Bert Bates, Kathy Sierra
- Refactoring Guru - Design Patterns for Humans