Loading repository data…
Loading repository data…
roku674 / repository
Comprehensive collection of software design patterns implemented in C#, Java, and JavaScript with practical examples
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A comprehensive collection of software design patterns implemented in C#, Java, and JavaScript with practical, easy-to-understand examples.
This repository contains implementations of all 23 Gang of Four (GoF) design patterns across three popular programming languages. Each pattern includes:
Whether you're preparing for interviews, working with legacy code, or improving your software architecture skills, this repository serves as a practical reference guide.
Design patterns are reusable solutions to common problems in software design. They represent best practices developed over time by experienced software engineers. The Gang of Four (GoF) patterns were documented in the influential 1994 book "Design Patterns: Elements of Reusable Object-Oriented Software" by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides.
Creational patterns deal with object creation mechanisms, trying to create objects in a manner suitable to the situation.
Structural patterns deal with object composition and typically identify simple ways to realize relationships between different objects.
Behavioral patterns are concerned with algorithms and the assignment of responsibilities between objects.
DesignPatterns/
├── CSharp/
│ ├── Creational/
│ │ ├── FactoryMethod/
│ │ ├── AbstractFactory/
│ │ ├── Builder/
│ │ ├── Prototype/
│ │ └── Singleton/
│ ├── Structural/
│ │ ├── Adapter/
│ │ ├── Bridge/
│ │ ├── Composite/
│ │ ├── Decorator/
│ │ ├── Facade/
│ │ ├── Flyweight/
│ │ └── Proxy/
│ └── Behavioral/
│ ├── ChainOfResponsibility/
│ ├── Command/
│ ├── Interpreter/
│ ├── Iterator/
│ ├── Mediator/
│ ├── Memento/
│ ├── Observer/
│ ├── State/
│ ├── Strategy/
│ ├── TemplateMethod/
│ └── Visitor/
├── Java/
│ └── (same structure as CSharp)
└── Javascript/
└── (same structure as CSharp)
Navigate to any pattern directory in your language of choice and follow the instructions in the pattern's README file.
C# Example:
cd CSharp/Creational/Singleton
dotnet run
Java Example:
cd Java/Creational/Singleton
javac *.java
java Main
JavaScript Example:
cd Javascript/Creational/Singleton
node index.js
If you're new to design patterns, we recommend studying them in this order:
Contributions are welcome! If you'd like to:
Please feel free to submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this repository helpful and would like to support continued development, please consider donating:
Your support helps maintain and expand this educational resource!
Found this helpful? Give it a ⭐️ to show your support!