hexagonal architecture
compound.compound. a way of designing computer software so that the core logic is kept separate from outside parts like databases or websites. This makes it easier to test the code and change parts of the system without breaking everything.
compound. a software design pattern that decouples the core application logic from external infrastructure and interfaces through the use of ports and adapters. This approach ensures that the business logic remains agnostic of the specific technologies used for data storage or user interaction.
Using hexagonal architecture makes it easier to swap our database later.
The team adopted hexagonal architecture to ensure their core business rules could be tested independently of the web framework.
By implementing hexagonal architecture, the developers isolated the domain model from external side effects, allowing for a highly modular system where adapters can be swapped with minimal impact on the core logic.
Coined by Alistair Cockburn in 2005. The name derives from the use of a hexagon as a visual metaphor to represent a system with multiple ports, avoiding the one-dimensional limitations of traditional layered diagrams.
Etymology adapted from Wiktionary, available under CC BY-SA 4.0.
Often used interchangeably with the term 'Ports and Adapters'.
Last updated July 22, 2026