Questions tagged [clean-architecture]
Clean Architecture is a book by Robert C. Martin that contains solutions to architecting software solutions. Collectively these concepts are referred to as "Clean Architecture".
264 questions
2 votes
2 answers
150 views
When using Clean Code with Ports and Mappers: which layer declares the Entity (Aggregate) factory interface and which one implements it?
So I was reading Eric Evans DDD book and one point that was not clear to me is which Layer (in case of using Clean Code) should be reponsible to: define the interface contract for an Entity (...
0 votes
1 answer
166 views
How do I encapsulate domain logic and preserve state in DDD+Clean Architecture?
(For context I am developing in Angular) Historically my applications have tended towards the layered architecture that the Angular fraemwork leads you into. However I feel that the next application I ...
5 votes
2 answers
1k views
Repository and Service Interfaces in an Accounting Software in Go with Uncle Bob's Clean Architecture
I'm trying to get hands-on experience with Uncle Bob's Clean Architecture in Go, but I'm running into some issues. Also, I'm not yet familiar with all of Go's idioms. For testing purposes, I'm ...
4 votes
1 answer
251 views
How do I handle polymorphic domain models in a Clean Architecture data access layer?
Let's say I'm making a space 4X game (because I am!) and I have an ISpaceObject interface in my domain layer, with a number of classes such as Ship, Starbase, Planet, Wormhole, etc. implementing it. I ...
0 votes
3 answers
758 views
Repository interfaces returning DTO in clean architecture used by query handlers
Repository interfaces are often defined in the Domain layer. This makes sense for command handlers, which call repository methods and return nothing. But what about query handlers that call repository ...
2 votes
2 answers
769 views
How should I implement data access with jpa to meet Clean Architecture/DDD
For the last few days I'm searching any information about compatibility of JPA and Clean Architecture/DDD. I found next ideas for decoupling application from hibernate. Do not use @ManyToMany or @...
2 votes
2 answers
328 views
Clean Architecture Chapter 8 - Financial Data Mapper
I’m studying Clean Architecture, and I came across a technical concept in the diagram from chapter 8. In this chapter, the author states that the Financial Data Mapper implements the Financial Data ...
3 votes
1 answer
428 views
Clean Architecture using interfaces or Mediator approach?
I'm starting a new project and I want to follow a Clean Architecture(ish) approach. I've modeled my projects in that manner (attached diagram). For the API I'm using FastEndpoint since I like it, it'...