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.

176 questions
0
votes
2 answers

DDD Call Adapter from Within Domain Object

I am implementing a Hexagonal Architecture with Domain Driven Design. I have a Value object called "Address" that has a "validate()" method. I would like to have a default validation provider for the address that is within my domain, but also allow…
sashok_bg
  • 2,436
  • 1
  • 22
  • 33
0
votes
1 answer

How to add an Interface into a constructor in an ItemProcessor with SpringBatch

In my java project I use the hexagonal architecture. I have an Interface "Use Case" called RapprochementUseCase who is implemented by a Service called "RapprochementService". In my ItemProcessor of my spring batch step I need to call to my Interface…
jenoh
  • 165
  • 3
  • 17
0
votes
0 answers

How to design Hexagonal Architecture communicate with multiple database

I'm learning to design a project using Hexagonal Architecture in java spring. I have domain layer, entity jpa to connect to mysql and entity elastic to map with elasticsearch. My main logic is when I update a product to mysql, I have to update it…
Thanh Khánh
  • 621
  • 1
  • 9
  • 21
0
votes
1 answer

Multi-module Gradle project - selectively managing dependencies in child modules

Lets say I have a multi-module Gradle Kotlin project. The structure is as follows: main - app runner + gluing everything together modules users users-adapters users-domain orders orders-adapters orders-domain Now - I wanted to be able to…
0
votes
1 answer

Golang with hexagonal architecture with logging middleware. I dont want to pass context to each components and methods

I am developing an application in golang with hexagonal architecture. I required to print the requestId in the logs where ever I want to use logs. To do this, I am generating a random request Id and attaching it with the GIN context. And suppose I…
Raju Yadav
  • 57
  • 3
0
votes
1 answer

How to handle authentication to adapters on a Hexagonal Architecture

I'm building an application for work using a hexagonal architecture and I have an entity (in the core layer) called CompanySetup. When my system receives a request I call my business service which calls a CompanySetupRepository (interface defined in…
0
votes
1 answer

How can I dockerize multi module Spring app?

I'm trying to dockerize my multi module application (i'm using hexagonal architecture with Port and Adapters pattern). Here is the structure of my application: App structure My root pom looks in this way:
0
votes
1 answer

Importing external libraries in the domain layer in DDD

I'm building an application based on DDD and Hexagonal Architecture. Hexagonal architecture suggests that you shouldn't, let's say, pollute your domain with logic of elsewhere, your Domain layer should be "pure" and only containing your business…
0
votes
2 answers

Hexagonal Architecture with Hibernate Reactive and Quarkus

I am using Hexagonal Architecture, Hibernate Reactive with Panache and Quarkus in a Kotlin Project. Transaction boundaries are set using @ReactiveTransactional annotation. The problem is that I had to add the whole Hibernate Reactive with Panache…
0
votes
1 answer

Union Type for Exceptions

I am looking for a solution where I might misuse TypeScript's type system. I have a service which provides a port for a repository (Interface that the Repository must implement) since the service must not know the concrete implementation of the…
0
votes
2 answers

DDD, problem with value objects and "new Domain()"

I have a question, I am migrating from MVC to hexagonal architecture and DDD architecture in a laravel project. I understand that a value object represents an attribute of table X but I have a problem, I have a table with 60 columns, would it have…
0
votes
0 answers

how to fix required a bean of type and This application has no explicit mapping for /error in spring boot

here is the aborescence of the packages com +-bass_trans.java_spring_eclips_management +-GestionBassTransApplication.java | +-worker +-adaters | +-in | | +-WorkerController.java (Rest controller…
0
votes
2 answers

How to map domain object to Jpa entity using hexagonal architecture

after reading articles on hexagonal architecture, i decided to implement these practices. only i'm stuck in one place, i'd like to know how to map domain objects into domain entities. here is what i tried //jpa entity @Entity @Data public class…
0
votes
1 answer

Symfony DependencyInjection class cannot be declared because the name is already in use

I created a new symfony 5.3 project. I'm developing this app using hexagonal architecture. I added a Bundle I developed for another symfony project. This bundle is working in the original project. But in the new project I get the following…
0
votes
1 answer

Where do you put third party libs when following Clean and Hexagonal Architecture?

I've been studying Clean Architecture, Hexagonal Architecture, and implementing pieces I find applicable to my application. I know both architectures talk about separating your domain from the outside world. All of the resources I've read use…