Skip to content

Ankit0431/Design-Patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Design Patterns Repository

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 πŸ›οΈ

πŸ“Œ Why Design Patterns Matter?

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.

πŸ›οΈ SOLID Principles – The Foundation of Good Design

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.

πŸ“‚ Repository Structure

πŸ“¦ 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.

πŸš€ How to Use This Repo?

  1. Clone the repo
    git clone https://github.com/AP0431/Design-Patterns.git
  2. Explore different patterns by navigating to the respective folders.
  3. Learn and implement them in your projects!

πŸ’‘ Contributing

Contributions are welcome! If you want to add improvements or new patterns, feel free to open an issue or submit a PR.

πŸ“œ License

This repository is licensed under the MIT License.

Happy Coding! 🎯

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages