Questions tagged [domain-driven-design]
Domain-driven design (DDD) is an approach to develop software for complex needs by connecting the implementation to an evolving model.
1,681 questions
10
votes
5
answers
1k
views
How to deal with public vs private version of same resource in a RESTFul API?
I am having a hard time to deal with one particular issue in API design that might be very common. Let me give the concrete example I have: I am writing a RESTFul API for a store and have the ...
0
votes
2
answers
265
views
How to catch up with a fast evolving codebase with AI First Software development?
After a couple of months using AI tools for programming, and improving how to do it, I started feeling a bit left behind in my codebase. Hence came back to Stackoverflow :)
Like I manage to do a half ...
5
votes
4
answers
950
views
Onion architecture object mapping
I'm reading and playing a bit with Onion on a mock side project and things got a little desperate with all the objects and the mappings.
Consider this Diagram of a request and the various ...
1
vote
1
answer
196
views
How should I design a password reset flow when the PasswordService depends on UserRepository (email vs ID)?
I’m working on a three layers architecture backend (Laravel).
Here’s the context:
I have a PasswordService responsible for updating a user’s
password.
and a Otpservice responsible for verifying/...
2
votes
1
answer
293
views
How should domain models be designed — rich domain models with encapsulated logic vs. anemic models with separate service/util layers?
I'm learning Domain-Driven Design (DDD) and studying different architecture patterns, and I’ve come across two seemingly conflicting design philosophies around domain modeling.
1. Rich Domain Model ...
1
vote
2
answers
257
views
Keeping the impact of changes low when moving shared domain objects into a library
I’m refactoring a microservice project where multiple services share the same domain objects. Over time, these objects have diverged across services, causing inconsistencies.
To solve this, I plan to ...
1
vote
2
answers
435
views
How to Handle Data Persistence In Domain Driven Design
I am currently reading about domain-driven design and n-tier architecture with a service layer, and comparing them to try to understand how each architecture is executed.
For n-tiers (specifically 3-...
0
votes
2
answers
288
views
How could I map a complex DTO to a Domain Aggregate in a Repository?
I'm working on a TypeScript application designed with DDD and using layered architecture. My infra layer has a repository that fetches a complex, nested DTO. My current implementation maps this DTO ...
2
votes
2
answers
211
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 (...
1
vote
3
answers
530
views
Practicing DDD from the biggest modules to the smallest widgets
I have a frontend project using VueJS and TS and I structured it using DDD. So far, I have some modules (bounded contexts, domains - use the term you prefer) which are used in two ways: some modules ...
4
votes
2
answers
495
views
Managing Growth in Microservice Architecture: Is Modular Monolith the Solution?
Our team of 5 members are managing a microservice architecture that currently includes around 200 Java Spring boot microservices, with approximately 50 new services being added each year. We follow ...
5
votes
3
answers
738
views
How to get rid of Mappers and make objects build themselves?
I am having a really hard time deciding where to instantiate my entities in the refactoring I am making. The project was built with DDD and it's layered: it has the infra, domain and app layers. In ...
5
votes
2
answers
276
views
Tree model in Domain Driven Design
A site is composed of pages.
Each page is either a root page or the
child of another page, forming a parent–child hierarchy.
The page tree has a fixed maximum depth.
When relocating a subtree:
The ...
4
votes
4
answers
292
views
Modeling superstate and substate combinations in DDD
I am designing an analytics application using domain driven design and test driven development.
I am having difficulty modeling the following requirement:
The application shows a workitem's state. ...
1
vote
2
answers
208
views
Dividing an HR Application into Bounded Contexts: Understanding How to Split a Domain into Multiple Models
I’m trying to understand bounded contexts by trying to apply them to an example HR application. According to a book called Patterns, Principles, and Practices of Domain-Driven Design (PPPDDD), context ...