Welcome to the CommonDesignPatterns repository — a hands-on showcase of the most widely used Object-Oriented Design Patterns implemented in C# (.NET). This repo is built not just for demonstration, but for learning-by-doing and explaining each pattern clearly with real-world analogies.
This project is a collection of classic design patterns — each pattern is implemented with clean, real-world use cases, and accompanied by clear explanations in the documentation.
Ideal for:
- Learners mastering C# OOP principles
- Developers strengthening their architecture skills
- Engineers looking for reusable, understandable pattern templates
Pattern Name | Category | Status | Description | Link to Doc |
---|---|---|---|---|
✅ Singleton | Creational | Completed | Ensures only one instance of a class exists globally | Documentation |
✅ Factory | Creational | Completed | Creates objects without specifying the exact class | Documentation |
✅ Strategy | Behavioral | Completed | Selects algorithm behavior at runtime | Documentation |
✅ Mediator | Behavioral | Completed | Facilitates communication between objects to reduce dependencies | Documentation |
✅ Adapter | Structural | Completed | Converts incompatible interfaces so they can work together | Documentation |
✅ Bridge | Structural | Completed | Decouples abstraction from implementation to allow independent variation | Documentation |
Each pattern includes:
- Real-world analogy (e.g., MediaPlayer for Adapter)
- Core interfaces and class structure
- Example use case
- Conceptual explanation (no code when clarity matters)
- Key takeaways — when and why to use the pattern