IT lexicon › Programming › Hexagonal Architecture

Hexagonal Architecture Ports & Adapters

Programming På svenska → Updated: 2026-05-24

Domain logic in the centre, surrounded by rings of "ports" (interfaces) and "adapters" that translate to database, HTTP, queues, etc.

Formulated by Alistair Cockburn in 2005. The hexagon shape is a graphic convention — the actual point is that the domain knows nothing about I/O. You can swap SQL for MongoDB or REST for gRPC by writing a new adapter, without touching the core logic. Close cousins: Clean Architecture (Robert Martin), Onion Architecture. Influential in the DDD movement.

← Back to the lexicon