A curated showcase of classic software design patterns
Real-world, commented code samples and concise explanations.
Explore essential object-oriented design patterns, complete with diagrams, animated explainers and example implementations.
This collection is meant both as a quick reference and as sample code for hands-on learners.
| Pattern | Folder / Link | Brief Description | Demo/UML Visual |
|---|---|---|---|
| Singleton | Singleton | Ensure a class has only one instance. | ![]() |
| Factory Method | FactoryMethod | Defer instantiation to subclasses. | ![]() |
| Abstract Factory | AbstractFactory | Create families of related objects. | ![]() |
| Adapter | Adapter | Convert one interface to another. | ![]() |
| Decorator | Decorator | Add behaviors to objects dynamically. | ![]() |
| Observer | Observer | Notify objects automatically of changes. | ![]() |
| Facade | Facade | Simplify complex subsystems. | ![]() |
Each pattern directory contains:
- A concise, annotated description
- UML Diagram
- Commented Java example
- Key use cases, pros & cons
- Pick the pattern you wish to explore
- Go to its folder for code and docs
- Review code comments and visuals
- Run, experiment or adapt for your own project
Design patterns are time-tested solutions to recurring software design problems.
Mastering them helps to:
- Increase code reuse and clarity
- Facilitate team communication
- Build scalable, robust software architecture
This repository is licensed under the GPLv3.
Feel free to fork and contribute!










