Software → Software Architecture
Hexagonal Architecture
An architecture style that isolates application core logic behind ports and adapters.
Motivation
Hexagonal Architecture solves the problem of business logic being tightly coupled to frameworks, databases, or external APIs.
Where it fits
It belongs to software architecture and relates to clean architecture, dependency inversion, ports and adapters, and testability.
Mental model
Place the core application logic in the center. External systems communicate through ports and adapters around the outside.
Common mistakes
- Adding too much ceremony to small applications.
- Treating every class as an adapter.
- Letting framework details leak into the core.