Design patterns are typical solutions to common problems in software design.
Patterns are a toolkit of solutions to common problems in software design. They define a common language that helps your team communicate more efficiently.
All patterns can be categorized by their intent, or purpose:
-
Creational patterns provide object creation mechanisms that increase flexibility and reuse of existing code.
- Singleton
- Factory Method
- Abstract Factory
- Builder
- Prototype
-
Structural patterns explain how to assemble objects and classes into larger structures, while keeping these structures flexible and efficient.
- Adapter
- Facade
- Composite
- Decorator
- Bridge
- Proxy
- Flyweight
-
Behavioral patterns take care of effective communication and the assignment of responsibilities between objects.
- Iterator
- Visitor
- Command
- Observer
- Mediator
- Strategy
- Template Method
- Memento
- Chain of Responsibility
- Observer