2 of 5
Architecture Styles
Clean Architecture: The Dependency Rule
Source code dependencies must always point inward — toward higher-level policy and away from details like frameworks and databases.
Robert Martin's Clean Architecture organises code into concentric layers: Entities (enterprise-wide rules), Use Cases (application-specific rules), Interface Adapters (controllers, presenters, gateways), and Frameworks & Drivers (web, database, UI). The Dependency Rule is absolute: source code dependencies must point inward only. Nothing in an inner layer may name or depend on anything in an outer layer.
Continue reading
- →
Dependency Injection and IoC Containers
Invert control of dependency creation to keep classes decoupled from their collaborators and trivially testable.
- →
The Observer Pattern and Event-Driven Design
Decouple publishers from subscribers by letting objects register interest in events without the producer knowing who is listening.
- →
The Strategy Pattern: Encapsulating Algorithms
Define a family of algorithms, encapsulate each one, and make them interchangeable — open for extension, closed for modification.