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,574
questions
0
votes
1
answer
34
views
How to stablish the relationship between two root entities from different bunded context in DDD?
I have two bounded context, one to handle files and another to handled bills.
I have two projects, one for each bounded contexts.
Files can be any kind of file, an image, a document in pdf or any ...
-1
votes
0
answers
68
views
SERVICES in sending ENTITIES in distributed systems
Here is a passage from the Blue book:
Distributed system architectures, such as J2EE and CORBA, provide
special publishing mechanisms for SERVICES , with conventions for
their use, and they add ...
0
votes
0
answers
32
views
Should input adapters receive the domain model?
This article on Medium addresses the scopes of the domain model in hexagonal architecture.
I have sketched the following generic hexagonal architecture:
On the one hand, the secondary/output adapter ...
0
votes
0
answers
50
views
How many domain models should I have? [duplicate]
Let's say I'm developing a simple blog and decided to use DDD.
Is it ok to have root aggregate called Posts which uses Posts abstract repository implementation of which can save both Posts and Tags(...
0
votes
1
answer
64
views
DDD On Large Scale Applications
Working on DDD lately got me thinking about how it preforms on large scale systems.
Watching many tutorials and reading many articles makes it look fun and promising for small projects.
I have three ...
-4
votes
1
answer
182
views
I do not like RESTful APIs anymore and dont understand why nobody agrees with me [closed]
Some years ago, every API I developed was a REST API and I did everything to follow the best practices to make them "RESTful".
But after some time, I have my doubts if RESTful APIs that ...
0
votes
1
answer
40
views
Where to store a props type declaration on a DDD project?
I am trying to apply DDD to a Vue project (so it's DDD on the frontend) and I have a doubt as to where store a props type. A Vue component can have props, which is basically named data passed to the ...
0
votes
2
answers
83
views
Where to put factories that depend on the application layer?
I am a frontend developer (currently working with Vue and TS), and I have been searching for better organization of the frontend code and recently I got to know DDD a bit. I know DDD is mostly used ...
0
votes
2
answers
69
views
How to structure a cart with cart products object
I am new to DDD and I am having trouble structuring an object. I have a cart, where I can add products to it. Each product has some properties like image, title, price, etc. Whenever a product is ...
1
vote
1
answer
118
views
How large and thorough should the domain layer be?
TL;DR: Should the domain layer span the entire breadth of the app such that everything can be simulated, from point A to point Z, or may the application layer be used as the orchestrator and serve as ...
0
votes
2
answers
187
views
Clean Architecture: Loading data for the domain layer
Let's say my domain has a User Entity that has a many to many relationship with itself representing "Friends"
public class User
{
public int Id;
public IEnumerable<User>? ...
-1
votes
0
answers
63
views
Design of Complex Java Filters
I have a collection of DTOs and would like to filter the collection on a complex set of criteria. For example:
//modelIds is a Collection<String>
cars
.stream()
.filter(car -> {
modelIds ==...
3
votes
6
answers
460
views
Marketing team's term for ubiquitous language
We are working on a ubiquitous language; however, there are different terms used for marketing purpose and one used for product team and engineering team. The marketing team's term is more for PR ...
-1
votes
1
answer
96
views
How to integrate business logic from Domain layer with UI
I have a rich client with quite complex domain logic and I want to keep the domain and presentation layer separated. How would you advice to intergrate the domain logic with the UI in this case.
I ...
0
votes
4
answers
202
views
The role of the Product Owner in a Scrum Team following Domain-Driven Design
In the Scrum framework, the Product Owner is the person responsible for preparing the backlog, refining it, and prioritizing it. He/she is expected to be a domain expert and somebody with enough ...
1
vote
1
answer
87
views
Where to perform conditional mapping in Domain Driven Design?
How can I do conditional mapping in Domain Driven Design?
Let's say my application is structured like this:
- Core
- Domain
- Application
- Presentation
- DTOs
- API
I have an aggregate root ...
0
votes
0
answers
44
views
Domain-Driven Design: Storage layer and MySQL client
I'm very new in DDD and I was following one of the videos of GohperCon to structure of my Golang App using DDD with Hexagonal Architecture. At the lowest (deepest) layer is the storage that can be ...
0
votes
0
answers
43
views
How to handle multiple-state domain object?
Let's take an example of Order.
An order can have the state new, canceled, shipped, or processing.
The new order can be processed.
The new order can be canceled.
The processing order can be shipped.
...
1
vote
1
answer
136
views
Console application vs. logger
I'm making a console application that returns a lot of information directly to the console. I do this with a custom logger. Actually my logger implementation is just a frontend to print (with some ...
1
vote
2
answers
164
views
In DDD, how can repositories be optional?
I was reading the infrastructure persistence layer design documentation, and this quote has me confused:
This'll probably be my biggest feedback. I'm really not a fan of repositories, mainly because ...
0
votes
2
answers
280
views
Deserializing/Serializing a cached domain object breaks DDD principles
My application has to maintain a stateful object and update it periodically based on events received. I get an initial HTTP request to create this stateful object. After that the object has to be ...
-1
votes
1
answer
56
views
Map a domain object from a third party application or a different bounded context
I'm tasked with developing an application which is going to track what an end user does in a session.
My application doesn't handle user registration or anything related to user. The user management ...
1
vote
2
answers
133
views
Placing business logic on a not so small/big project
I am having a bit of problem trying to find the correct place for business logic. The project I am working on isn't huge, but is not small either and has a very considerable importance in my company. ...
1
vote
2
answers
130
views
DDD - Entity model duplication vs Referencing the Entity Id in different bounded contexts
Asume these two bounded contexts:
Book Management: manages the creation of books and its attributes:
Book(id, name, author, summary, ISBN, length, cover photo)
Book Order: creates orders related to ...
0
votes
1
answer
65
views
Communicating unpredicted Failure from Repository implementation to Applicaiton Layer
My application follows Clean Architecture wherein the Application Layer wraps the Domain Layer. I try to adhere to DDD more-so as a "guiding light" than a strict rulebook.
Within the Domain ...
4
votes
3
answers
1k
views
Can two different kind of aggregates in Domain Driven Design have actually the same unique Id?
Assume that we are doing aggregate design for a ride hailing application and we have created the following aggregates: DriverAvailability aggregate, which has a value object containing the status (...
1
vote
2
answers
175
views
Is it allowed in DDD application to expose HTTP API endpoints for objects different than aggregate roots?
It's rather common knowledge that aggregate root provides an interface for every state change within that aggregate. For instance, aggregate root checks some business rules before some dependent ...
1
vote
0
answers
59
views
I have to have one application layer for all the projects or one application layer for each project?
I have a project with various bounded contexts. I have Purchases bounded context and product bounded context.
The two projects are developed by two diferent persons, so I am organazing the projects in ...
0
votes
0
answers
52
views
how to design the bounded contexts in DDD?
The context, or bounded contexts, it could be defined as a logical boundary of a domain where particular terms and rules apply consistently.
There are another definitions but more or less, this could ...
0
votes
2
answers
329
views
Mediator Pattern in c# - using a mediator to trigger policies
I'm wondering how i can implement what Im calling "business policies" in my code? For discussion purposes, let's say I have two separate contexts - synchronizeUsers and Licensing.
The ...
0
votes
2
answers
160
views
How do you handle using same data in different microservices
We have a microservices application and our User management service is the source of truth for user's first and last name. But we also need these in the Reporting service, where we generate reports ...
1
vote
2
answers
177
views
Using multiple databases in a bounded context
Sometimes we have to use multiple databases in one project
with the intentions of:
Denormalizing data or read models
Using the advantages of that database (technology)
There has been a lot of talk ...
0
votes
1
answer
58
views
Domain Boundary Definition in `proximity service` as a Case Study
While practicing System Design, I decided to create a hypothetical proximity service (like Google Maps) with a microservice architecture. Suppose we have 3 core categories of functionality:
CRUD ...
0
votes
4
answers
311
views
Should an aggregate root from another bounded context have a repository in another bounded context?
Right now we have a monolith application, and we will still have one monolith probably for the following years. What we are trying to do though, is to break the responsibilities more clearly in well-...
-1
votes
3
answers
612
views
How to properly design database in accordance with DDD
My Domain layer contains below model:
public class ApiResource
{
public bool Enabled { get; set; } = true;
public string Name { get; set; }
public string ClientId { get; set; }
public ...
-1
votes
3
answers
353
views
What is the point of DDD?
I'm writing a small card game with a friend and as of the last year I worked with DDD and love every minute,
So it felt natural to me to use DDD for our core domain logic of the game.
Doing a little ...
0
votes
1
answer
100
views
How to design this case in DDD (domain-driven design)?
I have an employee that has to record the time when it starts to work and the time when it finishes.
This records can be associated with a proyect or not. Project could be null.
The proyect has an ID ...
0
votes
3
answers
541
views
How to implement Repository if only part of Entity properties are needed?
From many articles and answers on DDD Repository pattern, I got the feeling that a Repository should only CURD an Entity (Aggregate Root) as a whole.
Following this convention, we always need to query ...
0
votes
2
answers
114
views
Domain Services vs Repositories when backed by a remote service
I'm building a DDD application which is effectively a wrapper around Cognito. As such, everything that this is doing is effectively just a call onto the Cognito SDK.
Where I'm getting confused is how ...
1
vote
2
answers
326
views
How to solve mailing and other delivery channels in DDD?
I am wondering where do I need to put email delivering logic in DDD applications? I have the impression that it is in presentation, because it is showing stuff to users and the domain usually does not ...
0
votes
2
answers
90
views
How to model Company aggregate containing a lot of users
Domain context and requirements
So let's say I have the following concepts in my domain:
Company: it's just a bunch of data related to a company. Name, creation date, assigned CSA, etc.
User: again, ...
1
vote
1
answer
784
views
Build a Rust project using Clean architecture and DB transactions in the same DDD bounded context
This is just an example of an (still incomplete) real-world project written in Rust using a clean architecture: https://github.com/frederikhors/rust-clean-architecture-with-db-transactions.
Goals
My ...
0
votes
3
answers
627
views
Is it needed a unit of work with DDD?
Reading about DDD, i have read that it is needed to have a repository per each aggregate entity.
For example, in an ordering system, I should have a repository for the order and another repository ...
0
votes
3
answers
195
views
A very basic doubt about who should start an action in DDD (domain-driven design)
When I read about DDD, it is always said that it is about behaviors, said in another way, actions than can be performed.
My doubt is that who should start the actions.
Suppose I have a bounded context ...
1
vote
1
answer
238
views
How can I restore an entity from the database while keeping my entities database-independent?
Background
I'm currently working on a project using domain-driven design and Dapper as my ORM. The entities are naturally slightly different than the tables in which they are stored (e.g. _id is ...
3
votes
1
answer
161
views
What is the anti-pattern for modules that group objects of the same type? [closed]
In MVC, I often seen all models in a models.py module, all views in a views.py module, and the controller - you guessed it - in a controller.py module. In other projects, I sometimes see all exception ...
1
vote
1
answer
264
views
Does calling an external API a part of transactional boundary
I have the following requirements :
A player in an FPS Shooter game has health points, where he can take damage and regain health.
One of the ways to regain health is by using a Health Booster that ...
1
vote
1
answer
221
views
DDD with remote service calls
I'm playing around with DDD, and in particular in cases that involve remote service calls. I'm building a system where the user records are actually backed by Cognito, so I've got to work with the ...
0
votes
1
answer
204
views
How to decomposing a single bounded context into multiple microservices for organisational purposes?
I have a monolith implementing what is basically an ETL process, receive data from external system, orchestrate the processing of it, and then pass the results back to an external system. (The ...
0
votes
2
answers
165
views
How to update a child entity of an aggregate root when I modify a property in another aggregate root?
I have one bounded conext, offers, that has Offers as root aggregate and Items as child entity.
I have another bounded context, products, which has Products as root aggregate, Providers as another ...