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
4
votes
0 answers

Can hibernate business objects be used as entities in a clean architecture?

In our project we use classes generated by eclipse hibernate plugin for persistence. The generated classes have following structure. MyClass extends BaseMyClass //POJO's, that are refenced in the hbm files MyClassDAO extends BaseMyClassDAO //DAO…
4
votes
1 answer

Hexagonal architecture/clean code: Problems implementing adaptor pattern

I'm currently writing a small console application on the Symfony 2 framework. I'm attempting to insulate the application from the framework (mainly as an exercise after hearing some interesting talks on hexagonal architecture/ports and adaptors,…
ChrisC
  • 2,385
  • 1
  • 14
  • 25
4
votes
1 answer

Rails: How do I make my rails project a Hexagonal rails project?

I attended a meetup yesterday on scaling Rails, and one topic was Hexagonal Rails. However, I've only been doing Rails for a year, and am really comfortable (maybe too comfortable) with the MVC structure, so I don't really understand what adapter…
bigpotato
  • 22,922
  • 46
  • 147
  • 286
3
votes
1 answer

Java code example of Hexagonal Architecture?

I've been doing a lot of research on Hexagonal Architecture aka ports and adapters. I like the concepts, but struggling with some of the practicality. For example, the Domain isn't supposed to have the database access details (implementation).…
3
votes
3 answers

DDD Ports and Adapters with Onion architecture, what goes where?

trying to figure out some concepts and haven't been able to understand What is a use-case in the Ports and Adapters architecture ? What an implementation of a use-case would look like ? What is a use-case concern ? Where does it fit in the…
3
votes
2 answers

What is actually the Domain Model in Ports and Adapters architecture?

As I was reading a lot lately regarding the Ports and Adapters architecture, I stumbled upon this piece of code as a part of an application that was build following the above mentioned architecture : package com.example.user.management; import…
mka
  • 51
  • 1
  • 4
3
votes
1 answer

What object i should have in command?

I writing system following hexagonal architecture. I have asynchronous commands and synch query objects split in UseCase. My src folder look…
timiTao
  • 1,401
  • 3
  • 19
  • 34
3
votes
1 answer

Showing data on the UI in the Hexagonal architecture

I'm learning DDD and Hexagonal architecture, I think I got the basics. However, there's one thing I'm not sure how to solve: how am I showing data to the user? So, for example, I got a simple domain with a Worker entity with some functionality (some…
bhaclash
  • 33
  • 3
3
votes
2 answers

DDD - Manage Coupling between Domain and Repository

My question is very simple: How do get my class's private data to the Repository to save? Regardless of the architectural style we adopt, everyone agrees that business objects shouldn't know "how" to save themselves - that is they shouldn't…
3
votes
1 answer

Hexagonal Architecture/Ports and Adapter Architecture for Windows Services. Right way?

I have read different sources about Ports & Adapters architecture proposed by Alistair Cockburn and find it apt for my scenario of developing a gateway service application which receives message from multiple sources and process the message and…
3
votes
1 answer

Adapter Pattern in SOA hexagonal/onion architecture

Assuming you have an application that requires 2 services, eg. Application, Service1, Service2 Should you build an extra level of indirection and promote 1 of the services to application service, and demote the other to domain service, following…
Alwyn
  • 7,493
  • 12
  • 48
  • 104
2
votes
2 answers

Application Events in DDD?

This question is similar to: Does exist application event term in DDD? , but I don't know how to apply the explanations given there to my specific issue. I have a SearchFilmUseCase and I want to raise an event FilmSearchedEvent once it finishes its…
2
votes
0 answers

Using hexagonal architecture in embedded systems

I'm trying to work out how the hexagonal (ports and adapters) architecture might be used in the context of an embedded software system. if I understand right, the architecture is something like this. /-----------------\ …
Dushara
  • 626
  • 1
  • 5
  • 23
2
votes
1 answer

where exaclty ports should be implemented?

In DDD implementation with Hexagonal Architecture the application might have ports (interfaces) and adapters (clients) .In my current project I am implementing Event driven based micorservices .I have a domain application service layer and and…
2
votes
2 answers

Work with dto's to build an API with DDD

I'm starting to work with dto's (data transfer objects) and I have some doubts about the best way to build the system architecture of the API. Imagine a domain entity 'A', with relations to 'B', 'C' and 'D'. We have a service 'S' that return a json…