Design patterns are typical solutions to common problems in software design. Each pattern is like a blueprint that you can customize to solve a particular design problem in your code. They are not finished designs that can be transformed directly into code, but rather templates for how to solve problems that can be used in many different situations.
Design patterns can speed up the development process by providing tested, proven development paradigms. Effective software design requires considering issues that may not become visible until later in the implementation. Reusing design patterns helps to prevent subtle issues that can cause major problems and improves code readability for developers and architects who are familiar with the patterns.
Design patterns are divided into three main categories:
- Creational Patterns: These patterns provide various object creation mechanisms, which increase flexibility and reuse of existing code.
- Structural Patterns: These patterns explain how to assemble objects and classes into larger structures while keeping these structures flexible and efficient.
- Behavioral Patterns: These patterns are concerned with algorithms and the assignment of responsibilities between objects.
- Abstract Factory (Virtual Constructor)
- Builder
- Factory Method
- Prototype (Clone)
- Singleton
- Chain of Responsibility (CoR / Chanin of Command)
- Command (Action / Transaction)
- Iterator
- Mediator (Intermediary / Controller)
- Memento (Snapshot)
- Observer (Event-Subscriber / Listener)
- State
- Strategy
- Template Method
- Visitor
- Interpreter
- Cheat Sheet
- Code Examples - First, clone this repository and then run the examples
This work is licensed under Creative Commons Zero v1.0 Universal.
