Skip to main content

Hexagonal Architecture (Ports & Adapters)

Learn Hexagonal Architecture (Ports & Adapters) (Software Architecture Patterns, Architectural Patterns) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

What is Hexagonal Architecture? Also called Ports & Adapters , this style puts the core business logic at the center, completely isolated from external concerns (database, UI, messaging, third-party APIs). The core defines ports (interfaces) describing what it needs; adapters implement those ports to plug in a specific technology. • Inbound ports - how the outside world drives the application (e.g. a PlaceOrderUseCase interface). • Outbound ports - what the application needs from the outside world (e.g. an OrderRepository interface the core defines, but doesn't implement). • Swapping the...

More lessons in Software Architecture Patterns