Clean Architecture

framework · computer science · organizing-schema

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.

Originators

Robert C. Martin (synthesis) high

Year / Decade

2012 (blog post); 2017 (Clean Architecture book) high

Primary sources

Martin, R.C. (2012). 'The Clean Architecture' (cleancoder.com), Martin, R.C. (2017). Clean Architecture: A Craftsman's Guide to Software Structure and Design high

Core components

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

Lineage

Child of
Onion Architecture
Siblings
Hexagonal Architecture, Onion Architecture, SOLID Principles
Derived from
Onion Architecture