wiki / concepts / onion-architecture

Onion Architecture

updated 2026-08-25 principle · workflow

Onion Architecture

An architectural pattern created by jeffrey palermo that organizes software into concentric layers with dependencies pointing inward toward the core domain. This pattern directly influenced clean architecture’s layered approach and emphasis on the dependency rule.

Core Principle

Like an onion’s layers, the architecture consists of concentric circles where:

  • Inner layers contain policies — business rules and domain logic
  • Outer layers contain mechanisms — infrastructure and implementation details
  • Dependencies point inward — outer layers depend on inner layers, never vice versa

Influence on Clean Architecture

robert c martin’s clean architecture synthesis adopted the onion pattern’s:

  • Concentric organization — the four-circle clean architecture structure
  • Inward dependencies — became the core dependency rule
  • Domain protection — business rules isolated from external changes

The onion pattern established the conceptual foundation for dependency inversion in layered architectures.

[source: uncle-bob-clean-architecture-2012]

Evidence — verified primary sources
uncle-bob-clean-architecture-2012 https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html
ingested 2026-08-25
sha256:b99ae450b598…