Clean architecture
Clean architecture, presented by Robert C. Martin (Uncle Bob) in 2012, organises a system into concentric layers: entities (business rules) at the centre, use cases around them, interface adapters next, frameworks and drivers on the outside. The Dependency Rule states that dependencies point inward — outer layers know about inner layers, never the reverse.
Clean architecture is one of several near-synonymous formulations of the same idea: hexagonal architecture (Cockburn 2005), onion architecture (Palermo 2008), DCI (Coplien & Reenskaug). All share the 'domain at the centre, infrastructure at the edge' commitment. The practical payoff: unit tests don't need a database; frameworks are upgrade-able without rewriting business rules; new delivery mechanisms (CLI, gRPC, Kafka consumer) are add-on adapters rather than restructures. The common mistake is over-engineering the layering for a system that doesn't need it — clean architecture earns its keep in long-lived systems where infrastructure churn is likely; small short-lived services rarely benefit.
Related terms
- Hexagonal architecture
Hexagonal architecture (also called ports and adapters), introduced by Alistair Cockburn in 2005, structures an application so the core domain logic depends only on abstract 'ports' — and concrete adapters (web framework, database, message bus) plug into those ports from outside.
- Domain-driven design
Domain-driven design (DDD) is a software-design approach, formalised by Eric Evans in 2003, that places the business domain at the centre of model design.