Questions tagged [hexagonal-architecture]

The Hexagonal Architecture is a software architecture proposed by Alistair Cockburn. It is also called Ports and Adapters. It is similar to the Onion Architecture proposed by Jeffrey Palermo.

Alistair Cockburn proposed the Hexagonal Architecture, also called Ports and Adapters. The architecture is similar to the Onion Arcitecture proposed by Jeffrey Palermo.

The fundamental motivation of the approach is to avoid layer-to-layer dependencies usually associated with the N-tier architecture approach. This is achieved by placing all infrastructure, including databases, outside the problem domain.

The problem domain is then completely independent of the required infrastructure (testing, databases, security, etc.). For example, this means that testing database accesses can be done thoroughly without a real database.

95 questions
1
vote
1 answer

Regression component tests with Cucumber. Is there any boundary to the layers that should be tested?

I found myself last week having to start thinking about how to refactor an old application that only contains unit tests. My first idea was to add some component test scenarios with Cucumber to get familiarised with the business logic and to ensure…
1
vote
1 answer

A data structure from Repository to serve all purposes?

I need help with something I can’t get my head wrapped around regarding the Repository and Service/Use-case pattern (part of DDD design) I want to implement in my next (Laravel PHP) project. All seems clear. Just one part of DDD that is confusing…
1
vote
1 answer

Unit of work/Transaction within an application service method?

I understand how to use entity framework to implement a unit of work and only commit changes after the full unit is performed, but how do i take this a step further? For example, the following needs to all happen under one…
1
vote
1 answer

Any advice regarding a hexagonal architecture with serialization as the primary metaphor?

I've got the opportunity to rewrite the core of an internally-developed application that my employer uses for document control. My "core" requirements list goes something like this: Make it easier to import/export to various formats (collection of…
Mike Burton
  • 2,900
  • 23
  • 31
0
votes
0 answers

Finding the location of hexagons on a pixel map

I am looking for a way in order to find on which hexagon I've clicked on my map with a 2D array, so I did a small program as : def center(x,y): for i in range(41): for j in range(22): coords[i].insert(j,[x,y]) …
Jay
  • 85
  • 4
0
votes
3 answers

Domain Driven Design (DDD): Domain Event Handlers – Where to place them?

I am confused about where to handle domain events in an application that is based on the hexagonal architecture. I am talking about the bounded-context-internal domain events, and not about inter-context integration/application/public…
0
votes
1 answer

Does an external service (Machine Learning Model Exposed trough an API) fit the DDD definition of a Repository?

The title was inspired by this question. Hello there! Im currently implementing an Hexagonal Architecture following DDD. In a usecase of the application, im using a sort of third service abstraction over an API that exposes a Machine Learning…
0
votes
1 answer

Typescript - Interfaces or classes for domain objects and DTO in Clean architecture?

I don't have much experience with Typescript nor implementing architecture patterns with it, but we are working in a project that we want to use Clean Architecture but I have the doubt of using class or interface for declaring DTO and Domain…
0
votes
0 answers

How properly handle generic parameters with Future functions?

We are implementing Hexagonal Architecture in our Flutter application. For authentication we created a interface which will be later inherited by the authentication repository. Two functions uses generic parameter: one is for social signup what can…
SalahAdDin
  • 1,432
  • 14
  • 42
0
votes
1 answer

DDD Hexagon - Should the Domain Layer ever talk to the Infrastructure (DAL) Layer in any situation?

As I understand it, one of the key rules of Hexagonal Architecture is how the Domain Layer is isolated from everything except the Application Layer which works with it (the Domain Layer has no dependencies at all as it sits in the core): My…
FBryant87
  • 3,751
  • 2
  • 33
  • 56
0
votes
1 answer

Calling overwrite confirmation dialog from database

Background I have my app setup as hexagonal architecture, with the UI (App), Domain and Database (Room) as separate modules. Upon pressing a button in the UI, user input data is being saved in the room database. If the Room database throws a…
Olli
  • 183
  • 2
  • 11
0
votes
1 answer

Laravel not finding the controller located in other folder

I'm trying to implement a clean architecture in laravel, thus I'm moving my own code to a src folder. My controller is located in src\notebook\infrastructure but when i call it from routes\web.php this way: Route::get('/notebook',…
0
votes
1 answer

Need an opinion about abstractions and update process in a domain model

I have an Agenda that holds many Card, and a Card has multiple DetailItem that hold a value like Email, Phone and a Label So, I can do: agenda = new Agenda() oneCard = new Card() item = new DetailItem(new Email("x@y.z"), new…
0
votes
1 answer

DDD and helper classes

I create an application based on DDD and hexagonal architecture in conjunction with CQRS (without ES). I'm stuck. In one of the bounded contexts I have layers: Domain, Application, Infrastructure, Ui. I think this is a fairly common…
0
votes
1 answer

Clarification on Port and Adapters / Hexagonal architecture

I have read Alistair's article on Hexagonal pattern and gone through other resources related to this (Alistair's videos, Short description of Ports & Adapters). I understand the general idea of Hexagonal architecture and what are the advantages it…
Vencat
  • 616
  • 3
  • 18