...

/

Hexagonal Architecture

Hexagonal Architecture

Learn about hexagonal architecture and its pros and cons.

Overview

Hexagonal architecture, also known as ports and adapters architecture, is a design pattern that separates the core functionality of an application from its external dependencies. It’s intended to make an application more flexible, modular, and testable by creating a clear separation between the business logic and the interfaces that connect the application to the outside world.

Principles of hexagonal architecture

Here’s an overview of the main components and principles of hexagonal architecture:

  • Core domain: This is the heart of the application, and it represents the business logic and the entities that make up the application’s domain. The core domain should be isolated from external dependencies and should contain no knowledge of the infrastructure or details of how it’s used.

  • Adapters: These are the components that connect the core domain to the outside world. They provide the interface between the core ...