jargon

Comparison

Clean architecturevsHexagonal 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 →

Hexagonal architecture

the same use case runs from an HTTP handler, a message consumer and a test, and none of them is the primary one.

An arrangement where the application defines ports — interfaces for what it needs and what it offers — and adapters implement them for HTTP, databases, queues or tests. The hexagon shape carries no meaning beyond having several sides; the content is that the application never depends on a delivery mechanism or a storage technology. It makes the application testable in isolation and adds an interface plus an adapter for every boundary, which is real work for a small service.

Full entry →

Related comparisons