Comparison
Clean architecturevsOnion architecture
Clean architecture
entities, then use cases, then adapters, then frameworks — and nothing in an inner circle names anything outside it.
Martin's synthesis of hexagonal, onion and several older layered schemes into concentric circles governed by the dependency rule. Its distinctive contributions are the naming of use case interactors as a layer of their own and the insistence that frameworks are a detail at the outermost ring. In practice it and hexagonal architecture describe the same system, and arguing about which one a codebase follows is rarely a productive hour.
Full entry →Onion architecture
the domain model sits in the middle with no dependencies at all, and everything else wraps around it.
Palermo's layering with the domain model at the centre, domain services around it, application services outside those and infrastructure at the edge, with all coupling directed inward. It is the middle term between traditional layering and hexagonal architecture, and it is the one that states most explicitly that the domain model has no dependencies. The three are close enough that most teams pick one name and stop.
Full entry →