Welcome to the GoF Design Patterns repository! This repository contains examples and implementations of the Gang of Four design patterns in various programming languages.
The Gang of Four (GoF) design patterns are a set of 23 software design patterns that describe how to solve recurring design problems in object-oriented software development. This repository aims to provide clear and concise examples of each design pattern implemented in various programming languages.
The repository covers three categories of design patterns:
- Singleton
- Factory Method
- Abstract Factory
- Builder
- Prototype
- Adapter
- Bridge
- Composite
- Decorator
- Facade
- Flyweight
- Proxy
- Chain of Responsibility
- Command
- Interpreter
- Iterator
- Mediator
- Memento
- Observer
- State
- Strategy
- Template Method
- Visitor
Each design pattern is organized in its own Package Category
ex: src/BehaviourPatterns/memento
The examples are provided in the following programming languages:
- Java
Clone the repository to your local machine using the following command:
https://github.com/SaiD-MH/Java-Design-Pattern/tree/main
Contributions are welcome! If you'd like to contribute to this repository by adding new design patterns, improving existing examples, or fixing bugs, please follow these steps:
- Fork the repository.
- Create a new branch (git checkout -b feature/your-feature).
- Make your changes.
- Commit your changes (git commit -am 'Add new pattern').
- Push to the branch (git push origin feature/your-feature).
- Create a new Pull Request.
Please ensure that your code follows the repository's coding standards and includes appropriate documentation.