Skip to content
Architecture & Design Patterns Glossary

Architecture & Design Patterns Glossary

SOLID principles, MVC, MVVM, Repository, Dependency Injection, CQRS, and every major software architecture pattern — explained with examples.

Pages in this section

SOLID — Explained with Examples

SOLID is a set of five object-oriented design principles that guide developers to build maintainable, scalable, and testable software systems.

✓ Live

SRP (Single Responsibility Principle) — Explained with Examples

The Single Responsibility Principle states that a class should have one reason to change, meaning it should handle only one concern or responsibility.

✓ Live

OCP (Open/Closed Principle) — Explained with Examples

The Open/Closed Principle states that classes should be open for extension but closed for modification, enabling new behavior without altering existing code.

✓ Live

LSP (Liskov Substitution Principle) — Explained with Examples

The Liskov Substitution Principle states that objects of a superclass should be replaceable with objects of a subclass without affecting program correctness.

✓ Live

ISP (Interface Segregation Principle) — Explained with Examples

The Interface Segregation Principle states that no client should be forced to depend on methods it does not use, favoring many specific interfaces over one general one.

✓ Live

DIP (Dependency Inversion Principle) — Explained with Examples

The Dependency Inversion Principle states that high-level modules should not depend on low-level modules — both should depend on abstractions, not concretions.

✓ Live

MVC — Explained with Examples

Model-View-Controller (MVC) is a software architectural pattern that separates an application into three interconnected components: data, UI, and logic.

✓ Live

MVVM — Explained with Examples

Model-View-ViewModel (MVVM) is an architectural pattern that separates UI development from business logic using data binding and commands.

✓ Live

Repository Pattern — Explained with Examples

The Repository pattern mediates between the domain and data mapping layers, providing a collection-like interface for accessing domain objects.

✓ Live

Factory Pattern — Explained with Examples

The Factory pattern provides an interface for creating objects without specifying their concrete classes, encapsulating object creation logic.

✓ Live

Singleton Pattern — Explained with Examples

Singleton is a creational pattern that ensures a class has only one instance and provides a global access point to that instance.

✓ Live

Dependency Injection — Explained with Examples

Dependency Injection is a technique where objects receive their dependencies from an external source rather than creating them internally.

✓ Live

CQRS — Explained with Examples

CQRS (Command Query Responsibility Segregation) splits an application into separate models for reading data and writing data to optimize each operation.

✓ Live

Event Sourcing — Explained with Examples

Event Sourcing stores state changes as an append-only sequence of events rather than overwriting the current state, preserving full audit history.

✓ Live

Clean Architecture — Explained with Examples

Clean Architecture organizes code into concentric layers where inner layers contain business rules and outer layers handle frameworks, UI, and infrastructure.

✓ Live

DTO and DAO — Explained with Examples

DTO (Data Transfer Object) carries data between layers while DAO (Data Access Object) encapsulates database operations behind an abstract interface.

✓ Live