Software Design Mastery

Master the fundamental principles and patterns of object-oriented design

SOLID Principles

Five fundamental principles of object-oriented programming and design

S

Single Responsibility Principle

A class should have only one reason to change, meaning it should have only one job or responsibility.

O

Open/Closed Principle

Software entities should be open for extension but closed for modification.

L

Liskov Substitution Principle

Objects of a superclass should be replaceable with objects of a subclass without breaking the application.

I

Interface Segregation Principle

No client should be forced to depend on methods it does not use. Split large interfaces into smaller ones.

D

Dependency Inversion Principle

High-level modules should not depend on low-level modules. Both should depend on abstractions.

Design Patterns

Reusable solutions to common software design problems

Creational Patterns

🔒

Singleton

Creational

Ensures a class has only one instance and provides a global point of access to it.

🏭

Factory Method

Creational

Defines an interface for creating objects, but lets subclasses decide which class to instantiate.

🏗️

Abstract Factory

Creational

Provides an interface for creating families of related objects without specifying their concrete classes.

🔨

Builder

Creational

Separates the construction of a complex object from its representation.

📋

Prototype

Creational

Creates new objects by copying an existing object, known as the prototype.

Structural Patterns

🔌

Adapter

Structural

Allows incompatible interfaces to work together by wrapping an object with an adapter.

🌉

Bridge

Structural

Separates an abstraction from its implementation so the two can vary independently.

🌳

Composite

Structural

Composes objects into tree structures to represent part-whole hierarchies.

🎨

Decorator

Structural

Adds new functionality to an object dynamically without altering its structure.

🎭

Facade

Structural

Provides a simplified interface to a complex subsystem.

Behavioral Patterns

👁️

Observer

Behavioral

Defines a one-to-many dependency so that when one object changes state, all dependents are notified.

♟️

Strategy

Behavioral

Defines a family of algorithms, encapsulates each one, and makes them interchangeable.

Command

Behavioral

Encapsulates a request as an object, allowing parameterization and queuing of requests.

🔄

Iterator

Behavioral

Provides a way to access elements of a collection sequentially without exposing its representation.

🎯

State

Behavioral

Allows an object to alter its behavior when its internal state changes.