liveBook · Manning

Hexagonal architecture

As explained in Acing the Frontend Interview

Hexagonal Architecture isolates domain logic behind inbound and outbound ports that are connected to external systems through adapters.

Hexagonal Architecture, also called the Ports and Adapters pattern, isolates domain logic behind inbound and outbound ports. Adapters connect those ports to external systems, keeping infrastructure concerns outside the core. section 6.1

Interview scenario: refactoring a monolith

When refactoring a monolith, first identify logical boundaries and coupling hotspots. Place business logic behind clear interfaces, then connect databases and other infrastructure through adapters. This supports independently testable components while the system remains operational through feature flags or routing fallbacks. A strong interview answer connects the pattern to separation of concerns, interface-driven design, and testability rather than merely naming it. section 6.1

Explain the pattern through these practical points:

  • Keep the domain core independent from infrastructure concerns such as data access. section 6.1
  • Use clear interfaces to make components independently testable. section 6.1

How Acing the Frontend Interview covers it

How deep it goes
Explains boundaries, interfaces, testability, and migration rationale, but does not detail port implementations.
Examples
Uses monolith refactoring, a user-management domain diagram, feature flags, routing fallbacks, and independently tested layers.
What it assumes
Assumes familiarity with layered systems and business logic while reinforcing separation of concerns and testability.
What you can do after
Apply it during monolith refactoring by defining interfaces, isolating business logic, and replacing infrastructure adapters safely.
How it connects
Connects domain logic with adapters, interfaces, layered architecture, N-tier architecture, and Onion Architecture.

Also explained in

Compare how 11 books explain hexagonal architecture →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the Frontend Interview. The section links point to the parts of the book it draws on.