Questions tagged [hexagonal-architecture]

The hexagonal architecture, also called ports and adapters architecture, aims at designing flexible component based architectures by decoupling the inner application core from the outside world by the mean of ports and adapters.

The hexagonal architecture is a pattern that aims at creating loosely coupled application components that can be easily connected to their software environment by means of ports and adapters.

This architecture makes components exchangeable by decouplings the inner application core from the outside world by using ports that define an API. Adapters make the glue between the software and its environment using the API. It is therefore also called ports and adapters architecture.

Ports define for example the API to be used the user interface and the database. Adapters can then connect the application to a test suite instead of a user interface, or connect the application to a different database.

External links:

46 questions
10
votes
4 answers

Hexagonal Architecture: What is the purpose of the input ports?

Pretty simple question, but googling brought me nowhere: What is the purpose of input ports in the hexagonal architecture? We are doing Java and seem to have some misunderstandings regarding the input part of this pattern. We presume: Domain Core /…
9
votes
3 answers

How does Hexagonal architecture solve N-tier's service spagetti?

I've seen a couple of talks on Hexagonal architecture where they illustrate problems with N-tier architecture. Specifically, they show a spaghetti of service layer dependencies as the software grows. For example, the image below is from the…
nogridbag
  • 209
1
vote
1 answer

Is it within Ports And Adapters architecture to have adapters constructed in the Application Layer?

I am writing a service and a library that I need to make framework agnostic because it will be used by some client services. The client services will be written in both Micronaut and Spring frameworks. So I must probably avoid DI in a container. The…