Hexagonal Architecture for Software Architects

Hexagonal Architecture for Software Architects
Photo by A Chosen Soul / Unsplash

Hexagonal Architecture (HA) aka Ports and Adapters Pattern, aka Onion Architecture is an architectural design pattern.

Why is there need for hexagonal architecture?

The motivation for the pattern is

  • to prevent from dependencies between layers and
  • to prevent contamination of layer/purpose specific code from other layers/purposes
  • to improve testability and to enable automated regression testing with domain use case focussed test coverage (blog post of the pattern inventor).