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
0
votes
1 answer

Domain Mapping - Convert Models from external Software to internal structure

i'm currently working on a php-framework to abstract and make it fun and easy to work with an external software ($ES) my company consults. My approach is the hexagonal design pattern, which works great so far. My only concern is mapping (and where…
0
votes
2 answers

JEE server that supports hexagonal/ port and adapters architecture

I would like write JEE app in ports and adapters architecture also known as onion, hexagonal or clean architecture. So I would like to inject dependencies by interface and not by implementation. And of course implementation is in separate maven…
masterdany88
  • 4,009
  • 8
  • 44
  • 114
0
votes
1 answer

Should my integration tests reuse persistence library to have access to db?

I have an implementation of DDD.IdentityAccess.Domain which contains IUserRepository abstraction. There is another dll -> DDD.IdentityAccess.Persistence.Sql which contains implementation of the IUserRepository abstraction. Now, I want to test my…
0
votes
1 answer

Best way to dynamically load adapters in hexagonal architecture?

I want to apply hexagonal architecture to my userManagement boundedContext. So I want to define 2 ports (one for UI, another one for serviceBus integration, to listen for events from another services). The question is if I want to implement…
0
votes
2 answers

Java 8 Application layer and specific output transformation

I have a gradle multiproject with 2 subprojects trying to emulate an hexagonal architecture : rest-adapter application layer I don't want the application services to expose the domain models and do'nt want to force a specific representation as…
Archange
  • 315
  • 4
  • 18
0
votes
1 answer

When to instantiate application service layer class?

I'm trying to apply hexagonal architecture to a project which will have several apps having to deal with the same domain model. We will have for example an mvc website requesting the application service which will then deal with the domain model and…
Jonathan
  • 1,086
  • 7
  • 31
0
votes
2 answers

Hexagonal architecture with repository

I am trying to understand hexagonal architecture through an example of Repository. In this setup I have the following layers: framework (infrastructure) -> application -> domain. I have User in the domain part, lets say I want to validate the User…
Albert Bos
  • 1,793
  • 1
  • 10
  • 24
0
votes
1 answer

Confusion about interaction with other domains

We're creating a new application for an entirely new domain model (and Bounded Context) 'Appointment'. We chose to combine CQS with Hexagonal Architecture (using ports and adapters) for our new domain. Our package structure mainly looks like…
0
votes
1 answer

Third party soap provider & Clean Architecture

We are designing an application with clean/hexagonal architecture paradigm but we are newbies on this. So we have some questions. The scenario is: We have an external SOAP service who gives to us some "Entity" information and related "Document" For…
0
votes
1 answer

DDD and Hexagonal architecture - Services

It's been a while since I started to build my DDD/Hexagonal architecture application, and I got quite overwhelmed with the amount of concepts related to both of them. Though I started to go slightly and trying to apply concepts when I found them…
0
votes
1 answer

Hexagonal architecture - sequence of calls

I'm trying to understand hexagonal architecture along with domain-driven design, but I'm confused with command handlers and command bus? Whether this should belong to application layer or domain layer? Also I could not find any example class or…
0
votes
1 answer

Guice and restricting clients to getting only certain instances

When using Guice, how to restrict clients to getting instances from a specific group of classes (aka the Facebook problem)? Imagine I architect my system using ports-and-adapters and I have an admin adapter side, a business logic component, and a…
beluchin
  • 9,529
  • 3
  • 22
  • 32
0
votes
1 answer

How can I split domain logic and data access in Grails

How can I split domain logic and data access in Grails (and is it a good idea)? Many software applications we write are rather data(base) centered and in Grails one often persist from service classes or controllers directly to a database configured…
0
votes
0 answers

Who and when creates Boundary stereotyped objects

In the Entity-Control-Boundary pattern, when is the boundary classes created and initiated, and by which stereotyped class? This question could also be equivalent to; In the hexagonal-architecture, Whom is responsible for creating Primary…
-1
votes
1 answer

Are Ports and Adapters supposed to abstract away the HTTP stack?

I am concerned about overengineering my code when thinking about Ports and Adapters architecture. Two very common examples of the system contacting with the outside world are my HTTP stack and local filesystem. These are clear situations when the…
SystematicFrank
  • 14,622
  • 5
  • 51
  • 95