A dedicated repository for learning, applying, and experimenting with classic and modern object-oriented design patterns.
This repository is a curated collection of Object-Oriented Design Patterns, organized into the three primary categories defined by the GoF ("Gang of Four") - Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides.
Design Patterns
├── Behavioral
├── Creational
└── Structural
Each folder contains:
- A dedicated implementation of its respective design pattern.
- A clear and easy-to-understand explanation
- A visual diagram illustrating how the pattern works
- Code examples that demonstrate real-world usage
The goal of this repository is to provide a hands-on, reference-ready space for studying, practicing, and mastering OOP design patterns through clean code and visual learning.
Creational Patterns: Patterns that focus on object creation mechanisms, enhancing flexibility and reuse.
Structural Patterns: Patterns that help organize relationships between classes and objects.
Behavioral Patterns: Patterns that manage communication, responsibility, and algorithms between objects.
- Chain of Responsibility
- Command
- Interpreter
- Iterator
- Mediator
- Memento
- Observer
- State
- Strategy
- Template Method
- Visitor
[1] Erich Gamma, Richard Helm, Ralph Johnson, John M. Vlissides,
Design Patterns: Elements of Reusable Object-Oriented Software,
Addison-Wesley Professional, 1994.
[2] Refactoring.Guru – Design Patterns
Design Patterns
├── Creational
│ ├── FactoryMethod
│ │ ├──Participants
│ │ │ └──...
│ │ ├──READ.md
│ │ └──main.py
│ ├── Singleton
│ └── ...
├── Structural
│ ├── Adapter
│ ├── Decorator
│ └── ...
└── Behavioral
├── Observer
├── Strategy
└── ...
Contributions are welcome! Whether it’s improving explanations, adding diagrams, or refining code examples, feel free to open a pull request or issue.
If this repository helps you understand design patterns more deeply, consider giving it a ⭐ to help others find it too!
