Welcome to the Design Patterns Repository! π This repository serves as a collection of commonly used Design Patterns, categorized into three main types:
- Behavioral Design Patterns π§
- Creational Design Patterns ποΈ
- Structural Design Patterns ποΈ
Design patterns provide proven solutions to common software design problems. They promote code reusability, scalability, and maintainability, ensuring that your software is not only functional but also clean and efficient. By leveraging these patterns, developers can create systems that are:
β
Modular β Easy to extend and modify.
β
Scalable β Can accommodate growing requirements.
β
Flexible β Adaptable to changing business needs.
β
Maintainable β Easier to debug and understand.
This repository follows the SOLID principles, which are key to writing robust and maintainable object-oriented code:
- Single Responsibility Principle (SRP) β Every class should have a single purpose.
- Open/Closed Principle (OCP) β Software entities should be open for extension but closed for modification.
- Liskov Substitution Principle (LSP) β Subtypes must be substitutable for their base types.
- Interface Segregation Principle (ISP) β No client should be forced to depend on methods it does not use.
- Dependency Inversion Principle (DIP) β High-level modules should not depend on low-level modules; both should depend on abstractions.
π¦ Design-Patterns-Repo
β£ π Behavioral-Patterns
β β£ π Chain-of-Responsibility
β β£ π Iterator
β β£ π Mediator
β β£ π Memento
β β£ π Observer
β β£ π State
β β£ π Strategy
β β π Template
β£ π Creational-Patterns
β β£ π AbstractFactory
β β£ π Builder
β β£ π Factory
β β£ π Prototype
β β π Singleton
β£ π Structural-Patterns
β β£ π Bridge
β β£ π Composite
β β£ π Decorator
β β£ π Facade
β β π Proxy
β π README.md (You are here!)
Each folder contains implementations and explanations for different design patterns belonging to its category.
- Clone the repo
git clone https://github.com/AP0431/Design-Patterns.git
- Explore different patterns by navigating to the respective folders.
- Learn and implement them in your projects!
Contributions are welcome! If you want to add improvements or new patterns, feel free to open an issue or submit a PR.
This repository is licensed under the MIT License.
Happy Coding! π―