Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
103 views

Passing data into Repository via dependency injection

Let's say I have a blog, I use DDD approach, I need to pass an instance of PaginationParameters class to PostsRepository, is it ok to bind DI container to concrete instance of PaginationParameters ...
cool_cat's user avatar
1 vote
2 answers
171 views

What's the connection between aggregate roots and has/belongs to relationships?

In trying to learn DDD by applying it to a new project, I've run into an obstacle. Here's a simplified structure of my very real domain: a project has many components which have many objectives which ...
verified_tinker's user avatar
-1 votes
2 answers
129 views

How to establish the relationship between two root entities from different bundled contexts in DDD?

I have two bounded contexts, 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 ...
Álvaro García's user avatar
-2 votes
1 answer
97 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 ...
cool_cat's user avatar
0 votes
0 answers
74 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 ...
user946822's user avatar
0 votes
1 answer
178 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 ...
Br4infreze's user avatar
-3 votes
1 answer
302 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 ...
David Mason's user avatar
0 votes
1 answer
70 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 ...
Bernardo Benini Fantin's user avatar
0 votes
2 answers
122 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 ...
Bernardo Benini Fantin's user avatar
0 votes
2 answers
131 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 ...
Bernardo Benini Fantin's user avatar
1 vote
1 answer
132 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 ...
verified_tinker's user avatar
1 vote
2 answers
562 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>? ...
MyUsername112358's user avatar
3 votes
6 answers
515 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 ...
Danny's user avatar
  • 57
-1 votes
1 answer
136 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 ...
Liero's user avatar
  • 140
0 votes
4 answers
454 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 ...
BiA's user avatar
  • 121
1 vote
1 answer
143 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 ...
J.Kirk.'s user avatar
  • 121
0 votes
0 answers
74 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 ...
markfw's user avatar
  • 101
0 votes
0 answers
70 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. ...
Ngọc Nguyễn 's user avatar
1 vote
1 answer
146 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 ...
etroby's user avatar
  • 19
1 vote
2 answers
731 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 ...
MyUsername112358's user avatar
0 votes
2 answers
1k 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 ...
user1890098's user avatar
-1 votes
1 answer
88 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 ...
user1890098's user avatar
1 vote
2 answers
175 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. ...
Bernardo Benini Fantin's user avatar
1 vote
2 answers
478 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 ...
codependent's user avatar
0 votes
1 answer
77 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 ...
John Hall's user avatar
  • 163
4 votes
3 answers
2k 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 (...
Antonis's user avatar
  • 149
1 vote
2 answers
352 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 ...
Jacek's user avatar
  • 119
1 vote
0 answers
65 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 ...
Álvaro García's user avatar
1 vote
0 answers
86 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 ...
Álvaro García's user avatar
0 votes
2 answers
843 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 ...
dot's user avatar
  • 571
-2 votes
2 answers
108 views

What methods on choosing the objects to be modelled? [closed]

From my conversation with @Steve in the question Is there any philosophical theory behind the concept of object in computer science? on Philosophy Stack Exchange: Steve: More often than not, ...
Ooker's user avatar
  • 315
0 votes
2 answers
186 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 ...
rqpa93's user avatar
  • 11
1 vote
2 answers
304 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 ...
PersianMan's user avatar
0 votes
1 answer
92 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 ...
Andrew Sharifikia's user avatar
0 votes
4 answers
700 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-...
Antonio Gamiz Delgado's user avatar
-1 votes
3 answers
2k 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 ...
Szyszka947's user avatar
-1 votes
3 answers
607 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 ...
Br4infreze's user avatar
0 votes
1 answer
142 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 ...
Álvaro García's user avatar
3 votes
3 answers
1k 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 ...
zwcloud's user avatar
  • 131
0 votes
2 answers
214 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 ...
Graham's user avatar
  • 139
3 votes
2 answers
786 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 ...
inf3rno's user avatar
  • 1,249
0 votes
2 answers
131 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, ...
Antonio Gamiz Delgado's user avatar
2 votes
1 answer
2k 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 ...
Fred Hors's user avatar
  • 139
1 vote
3 answers
2k 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 ...
Álvaro García's user avatar
0 votes
3 answers
335 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 ...
Álvaro García's user avatar
1 vote
1 answer
338 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 ...
JansthcirlU's user avatar
4 votes
1 answer
230 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 ...
Chewers Jingoist's user avatar
1 vote
1 answer
466 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 ...
Br4infreze's user avatar
2 votes
1 answer
455 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 ...
Graham's user avatar
  • 139
0 votes
1 answer
461 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 ...
user1937198's user avatar

1
2
3 4 5
33