Clean Architecture
Martin's synthesis of hexagonal and onion patterns with strict dependency rule.
Clean Architecture was articulated by Robert C. Martin ('Uncle Bob') in his 2012 blog post and subsequent 2017 book Clean Architecture: A Craftsman's Guide to Software Structure and Design, explicitly synthesizing Hexagonal Architecture (Cockburn 2005), Onion Architecture (Palermo 2008), Boundary-Control-Entity (Jacobson), and DCI (Data, Context, Interaction; Reenskaug & Coplien). The four-circle diagram presents Entities (enterprise business rules) at the center, then Use Cases (application business rules), then Interface Adapters (presenters, controllers, gateways), and Frameworks & Drivers (databases, web frameworks, devices) at the outer edge. The Dependency Rule — dependencies point only inward — is the central architectural commitment, with the implication that frameworks and databases are 'details' that should be deferred and substitutable. Martin's synthesis is widely-read but his prescriptive framing has drawn substantial criticism for over-abstraction in simple applications and for the SOLID-Plus-Clean-Architecture combination producing more architectural ceremony than warranted by typical application complexity.
Core components
- Four concentric circles: Entities (innermost), Use Cases, Interface Adapters, Frameworks & Drivers
- Dependency Rule (source dependencies point only inward)
- Boundaries between circles defined by interfaces and dependency inversion
- Frameworks and databases as 'details' deferred to outer ring
- Connection to SOLID principles
- Synthesis of Hexagonal, Onion, BCE, and DCI
- Use Case as central application logic unit
Primary use case
Application architecture across languages and frameworks; widely cited reference framework in software architecture education; foundation for many enterprise application templates and reference architectures; basis for testable application design; integration with DDD tactical patterns.
Common criticisms
- Substantial complexity overhead for simple applications — Clean Architecture is overkill for most CRUD apps
- layered structure produces extensive boilerplate (data transfer between layers, mapping, presenter logic)
- 'frameworks are details' framing is contested for systems where framework choice meaningfully shapes application capability
- some critics argue Clean Architecture is a relabeling of Hexagonal/Onion without distinct contribution
- Robert Martin's prescriptive style can feel dogmatic
- large reference codebases adopting Clean Architecture without genuine domain complexity become harder to maintain than simpler structures would be
- the four-circle visual obscures the underlying dependency-inversion principle that is the actual contribution.
Lineage
- Child of
- Onion Architecture
- Siblings
- Hexagonal Architecture, Onion Architecture, SOLID Principles
- Derived from
- Onion Architecture