Back to Catalog
Cloud
aws
Hexagonal Architecture
Separate core business logic from external concerns using ports and adapters
Intent & Description
The Hexagonal Architecture pattern separates core business logic from external concerns using ports and adapters. The core application logic is independent of databases, UI, and external services. Adapters handle the translation between external systems and the core. This enables testability, maintainability, and flexibility in choosing technologies.
Real-world Use Case
Use when you want to separate business logic from infrastructure concerns, improve testability, or make your application more maintainable and flexible.
Source
Advantages
- Separates business logic from infrastructure
- Improves testability
- Enables technology flexibility
- Supports domain-driven design
Disadvantages
- Increased initial complexity
- More layers to manage
- Learning curve for the pattern