Skip to main content

All Questions

6 votes
3 answers
661 views

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 ...
RuDaHee's user avatar
  • 171
0 votes
2 answers
221 views

Where perform mapping in strict Domain-Driven Design?

I want to create an example application where we use a strict domain-driven design and layering (controller, service, repository). Most notably, we have a clear distinction between the domain and the ...
Gman's user avatar
  • 9
0 votes
1 answer
126 views

Where to put getOrSave responsibility?

I have many repeated parts of service logic which just fetches object if it exists or returns a newly saved one. I want to move it from service because it just clutters up the logic. But I do not ...
DimitrijeCiric's user avatar
2 votes
3 answers
922 views

How can I avoid duplicate annotations when validating both Entity and DTOs?

I am using the Spring Boot framework to create a RESTFUL API and I need a way to avoid the duplication of validation rules when using multiple DTOs as request/response objects for my endpoints. Using ...
Marco Pierre White's user avatar
9 votes
1 answer
2k views

How to achieve both: clean (hexagonal) architecture with JPA goodies?

How do I achieve two things at the same time writing Java Spring Application: Clean Architecture JPA goodies (@Transactional, Optimistic Locking, dirty checking, etc.) I like the idea of database/...
Dariusz Mydlarz's user avatar
3 votes
1 answer
21k views

Project Structure of Domain Driven Design in maven Java Spring-Boot [closed]

My team is in dilemma, we have an existing maven spring-boot Java8 project with following onion architechture. controller --> service --> dao --> jpa repositories ...
Dave Ranjan's user avatar
0 votes
1 answer
769 views

In implementing layered API architecture with Spring MVC Boot, how to connect to various endpoints

If you want to implement a layered API design for example, you may have one API layer that represents the application layer. And I assume that the application layer is represented by an endpoint and ...
berlinbrown2's user avatar
4 votes
1 answer
1k views

Does the Spring Data Repository implementation violate the principle of loose coupling?

So, at the moment I find myself building my c#/.net (web) application ( or folder/project/package-...) structure often like this, thinking about it in a "somewhat onion-architectural way": myApp -...
Dominik's user avatar
  • 143