jargon

Comparison

Functional core, imperative shellvsHexagonal architecture

Functional core, imperative shell

all the decisions are in functions with no I/O, and a thin outer layer does the reading and writing around them.

An arrangement where the interesting logic is pure and testable and a thin imperative layer performs the effects at the edges. It is the practical, framework-free version of the same idea hexagonal architecture states with ports and adapters, and it gets most of the benefit for a fraction of the machinery. The characteristic sign it is working is a test suite with almost no mocks in it.

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