← Back to Charlie Martin

Notebook

Clean Architecture

Keeping business rules ignorant of the frameworks that ship them.

A codebase can be well-factored and still be married to its framework. Robert C. Martin’s Clean Architecture names the divorce: business rules sit in circles that know nothing about the web, the database, or whatever delivers them to a user. Hexagonal, Onion, and Screaming Architecture reach the same place by different roads. Martin’s diagram was an attempt to draw the one idea underneath all three.

This notebook follows that idea from the rule that makes it work through to the payoff it buys you. The examples come from eShopOnWeb, the reference app Steve “Ardalis” Smith built to demonstrate the architecture in ASP.NET Core, originally for Microsoft and now community-maintained at NimblePros.

Start at The Dependency Rule.