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.
49 questions
1vote
2answers
192views
How to persist an entity corresponding to a polymorphic association table in Domain-Driven Design?
A polymorphic association table is a database design pattern that allows a single table to associate with multiple other tables, where the related tables can be of different types. Scenario: Multiple ...
6votes
3answers
652views
Hexagonal Architecture + Domain Driven Design. How to perform a correct implementation?
Currently, I am trying to implement these two architectures together with Java and Spring (although technology shouldn't matter I think). But I'm encountering problems getting them to work together. I ...
1vote
0answers
137views
DDD -Can an aggregate consumes its own events?
I'm facing to an issue with my design in DDD with "Always valid Domain Model" principale and eventual consistency. I have an aggregate with several public methods to mutate its state. class ...
0votes
1answer
166views
How to model two bounded contexts with tight coupling between them
Context Hello, at my company we have been working with DDD for some time now. We have a monolith and some services. The bounded contexts in the monolith use HTTP calls to communicate between them or ...
3votes
2answers
407views
In Hexagonal Architecture how do I implement a Dead-Letter Queue?
I have an application using Hexagonal Architecture. I want to implement a DLQ in 2 scenarios: When the event streaming adapter's incoming message is unreadable (invalid payload, etc) When the domain ...
5votes
1answer
1kviews
What is the difference between Hexagonal Architecture and Anti Corruption Layer Pattern?
I tried searching the web but can't understand the difference/boundary between hexagonal(ports and adapter) architecture and ACL Pattern. While hexagonal architecture talks about creating ports(...
1vote
2answers
2kviews
Exception Handling in Hexagonal Architecture
how could we advise the web client about a non-recoverable exception thrown by the persistence adapter ? At first sight, I would define a domain exception to be thrown by the persistence adapter and ...
0votes
1answer
385views
How choose between Clean Arch and Hexagonal Arch(Ports And Adapters)?
I'm studying architecture patterns and I don't understand which type of scenario is more preferable to use clean architecture or hexagonal architecture. Is there something like that? For example, &...
1vote
1answer
364views
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....
7votes
2answers
8kviews
Key difference between Hexagonal Architecture vs Clean Architecture?
I am trying to improve the architecture for my React app project that has grown in size lately. I'm looking at Hexagonal architecture and Clean architecture, and I couldn't really see the difference ...
0votes
1answer
79views
Domain Models in dynamic languages?
I create Hexagonal Architecture based software with TypeScript or C#. The heart of Hexagonal Architecture is the Domain Model. For example, for a user of application y, the domain model might look ...
-1votes
2answers
534views
Where does a Spring Application reside in Hexagonal Architecture
During this weekend I read "Get Your Hands Dirty on Clean Architecture" by Tom Hombergs. I am working on a microservice that was born with Hexagonal Architecture in mind, so I was able to ...
1vote
1answer
340views
Hexagonal architecture and object instantiation
I don't have enough experience to understand how hard object instantiation and garbage collection really hit. So I tend to write code where I don't just spin up objects for the sake of it. However, ...
0votes
1answer
137views
How to seamlessly interact with a message broker when the underlying system (SQS, RabbitMQ) can change depending on the environment?
Having a poor knowledge of the extended features of the available message brokers, I was wondering how to approach this. We have some environments where only RabbitMQ is available, others where ...
3votes
1answer
3kviews
In Clean Architecture, how do we name UseCases that get more and more specific without the names becoming too long?
All the examples of Clean Architecture that I see have very simple use cases, such as: OpenAccountUseCase DepositMoneyUseCase However, real world applications have much more complex logic. Let's say ...