Skip to content

shivamjaswal/Design

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Design Principles & 🎯 Design Patterns

Welcome to the Design Principles and Design Patterns repository!
This repository is a curated collection of the most essential Object-Oriented Design Principles and Software Design Patterns used by professional developers to write clean, maintainable, and scalable code.


πŸ“š Table of Contents


πŸ€” What Are Design Principles?

Design Principles are a set of guidelines that help developers make better design decisions, leading to more robust and flexible software architecture.


🧱 SOLID Principles

A set of five principles introduced by Robert C. Martin to improve Object-Oriented Design:

  1. S – Single Responsibility Principle (SRP)
  2. O – Open/Closed Principle (OCP)
  3. L – Liskov Substitution Principle (LSP)
  4. I – Interface Segregation Principle (ISP)
  5. D – Dependency Inversion Principle (DIP)

Each principle is explained with real-world examples and code snippets.


πŸ”‘ Other Key Principles

  • DRY (Don’t Repeat Yourself)
  • KISS (Keep It Simple, Stupid)
  • YAGNI (You Aren’t Gonna Need It)
  • Law of Demeter
  • Composition Over Inheritance

πŸ—οΈ What Are Design Patterns?

Design Patterns are time-tested solutions to common problems in software design. They provide a shared language and proven practices for solving recurring design problems.


πŸ”¨ Creational Patterns

  • Singleton
  • Factory Method
  • Abstract Factory
  • Builder
  • Prototype

🧱 Structural Patterns

  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Facade
  • Flyweight
  • Proxy

🧠 Behavioral Patterns

  • Strategy
  • Observer
  • Command
  • Iterator
  • Mediator
  • Memento
  • State
  • Visitor
  • Template Method
  • Chain of Responsibility

βœ… Best Practices

  • Code examples in Java (or other languages you include)
  • UML Diagrams for each pattern
  • Real-world use cases
  • When to use & when to avoid each pattern

πŸ“š Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages