Skip to main content

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
1 vote
1 answer
115 views

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/...
aymen's user avatar
  • 23
1 vote
1 answer
225 views

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 ...
Penchala Yegu's user avatar
0 votes
2 answers
203 views

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 ...
Ryley38's user avatar
  • 111
1 vote
2 answers
267 views

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-...
Errors for life's user avatar
0 votes
2 answers
177 views

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 ...
Bernardo Benini Fantin's user avatar
2 votes
2 answers
154 views

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 (...
Prometheus's user avatar
1 vote
3 answers
472 views

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 ...
Bernardo Benini Fantin's user avatar
4 votes
2 answers
329 views

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 ...
User1254's user avatar
5 votes
3 answers
667 views

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 ...
Bernardo Benini Fantin's user avatar
5 votes
2 answers
232 views

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 ...
Dante's user avatar
  • 161
4 votes
4 answers
248 views

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. ...
Afelium's user avatar
  • 51
1 vote
2 answers
158 views

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 ...
EMN's user avatar
  • 795
2 votes
3 answers
332 views

The company I'm working at has strict policies that insist that all business logic is contained in Domain Models as part of DDD. I can see how this approach could work well for something like a ...
Mog0's user avatar
  • 147
0 votes
1 answer
168 views

(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 ...
royneedshelp's user avatar
3 votes
5 answers
217 views

When a single physical entity means different things in different contexts, DDD principles recommend creating different entities in each bounded context. This is an example taken from the book "...
EMN's user avatar
  • 795
3 votes
3 answers
255 views

I'm working on a DDD-based system and was researching the best way to handle domain services and keep business logic consistent. During my research, I came across this insightful quote from Steve ...
Mr_Sure21's user avatar
1 vote
0 answers
85 views

I’m working on a DDD-based architecture using WPF. Currently, my Domain, Application, and Infrastructure layers are all implemented as .NET Standard projects, though I’m not certain if that’s the best ...
Stelios's user avatar
  • 235
-1 votes
1 answer
78 views

There is a case management application. New requirements want to add statuses to cases. The case will go through a series of statuses until completion. Each case belongs to a case type. There are many ...
EMN's user avatar
  • 795
5 votes
2 answers
173 views

I want to model the organizations and users using DDD. I have the following aggregate roots: Users Can join multiple organizations Can join at most 100 organizations Can only be deleted when it is ...
F21's user avatar
  • 161
3 votes
2 answers
194 views

Below is an example scenario that can be used to illustrate your answer. Let's say there is a CoffeeMachine aggregate with a set of methods similar to the following: Methods used by admins. ...
EMN's user avatar
  • 795
1 vote
1 answer
192 views

I am working on the migration of a project from desktop to web. I am using VueJS 3 (composition API). Since this project has lots of modules, I thought about using DDD on the frontend for organization ...
Bernardo Benini Fantin's user avatar
1 vote
1 answer
138 views

I have a data model with the following relationships: Shipment 1 --- * ShipmentLine 1 --- * Component I have two use cases around which I am trying to create a domain model. The use cases are: ...
shawnseanshaun's user avatar
2 votes
3 answers
168 views

Below is a scenario that needs to be modeled using the Domain-Driven Design (DDD) approach. A Project can have Notes added to it. A Note cannot exist without a Project. A Note needs to be viewable ...
EMN's user avatar
  • 795
3 votes
2 answers
2k views

In domain driven design, repositories are created for aggregate roots only. Does this mean that all repository methods should return an instance or a collection of the aggregate root for which the ...
EMN's user avatar
  • 795
0 votes
3 answers
771 views

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 ...
MrChudz's user avatar
  • 147
1 vote
2 answers
238 views

A polymorphic association table is a database design pattern that allows a single table to associate with multiple other tables, where the related tables can be of different types. Scenario: Multiple ...
EMN's user avatar
  • 795
0 votes
1 answer
158 views

Let's say a project has an application layer and a domain layer. AFAIK services implemented in the application layer execute use cases. The methods defined in the services often contain ubiquitous ...
EMN's user avatar
  • 795
0 votes
2 answers
112 views

I have a project with four layers: Domain Application Infrastructure Presentation I have an email service interface in the Application layer. It takes an interface parameter called ...
EMN's user avatar
  • 795
1 vote
3 answers
315 views

In a CQRS architecture, at least as implemented by Vaughn Vernon in IDDD_Samples, the query services lives in the application layer. But then where and how should authorization be handled? For example,...
Kyle Richards's user avatar
3 votes
3 answers
402 views

A common DDD wisdom I encounter online is that your repository should not return more than one aggregate type. But I came across this passage from Vaughn Vernon's book "Implementing Domain-Driven ...
Kyle Richards's user avatar
0 votes
1 answer
247 views

I am trying to decide what the best way of storing my data would be. I want to build a cqrs application where I also apply DDD principles like aggregates in the command side. I started with with ...
securita's user avatar
3 votes
5 answers
1k views

I work with a lot of Groovy code. One feature of the language is the "safe navigation operator" (?), which I think of as an inline null check. There are many things about Groovy that I like, ...
Gus Murphy's user avatar
0 votes
1 answer
249 views

In Vaughn Vernon's book "Implementing Domain-Driven Design", he talked about repositories that allows you to query for partial aggregates using a "use case optimal query": (from ...
Kyle Richards's user avatar
2 votes
3 answers
320 views

I'm currently reading "Implementing Domain-Driven Design" while going through the code samples, but I'm having trouble modeling aggregates that stores a huge list of value objects. For ...
Kyle Richards's user avatar
3 votes
3 answers
313 views

Engineering Community, I am currently writing my bachelor's thesis on microservices and DDD (this is not the actual topic, but it is part of it). The language I am writing in is Rust, but that is ...
Hannes's user avatar
  • 39
1 vote
3 answers
419 views

I started writing my application with a very understandable assumption that every Aggregate should be represented by a root entity that has its own ID (a surrogate key). But I think I have found a ...
alaboudi's user avatar
  • 285
1 vote
1 answer
327 views

I'm trying to model P2P crypto trading using DDD and I'm having trouble modeling the lifecycle of sell orders. Lifecycle: Some trader-seller creates an order. Some trader-buyer responds to it. Buyer ...
Алексей's user avatar
2 votes
2 answers
784 views

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 @...
AndyFlight's user avatar
4 votes
2 answers
298 views

This is inspired by Eric Evans' presentation about bounded contexts when doing Domain driven design. In his presentation he presents a case where a bank has initially 2 teams that manage 2 bounded ...
Songo's user avatar
  • 6,663
1 vote
0 answers
83 views

Suppose I've got a spring controller as follows: ⋮ @RestController public class MyController { ⋮ @PostMapping(value = { "publicAPI/addItem", "internalAPI/addItem" }) ...
zZz's user avatar
  • 11
0 votes
2 answers
320 views

Let's say there is a domain model: @Table(name = "room") @Getter @FieldNameConstants @AllArgsConstructor(onConstructor = @__({@PersistenceCreator})) public class HotelRoom extends ...
叶知泉's user avatar
0 votes
3 answers
499 views

Say I'm building my own backend framework (really I'm just learning) and I have a simple class: class User { String email String passwordHash Date birthdate Int getAge() { ...
Mahi's user avatar
  • 406
6 votes
3 answers
1k views

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
1 vote
2 answers
205 views

I've been reading articles on Hexagonal, Onion, Clean Architectures, and other Domain-Driven Designs. A common theme they emphasize is decoupling components. From what I gather, this means the UI ...
Saurabh Batra's user avatar
0 votes
1 answer
338 views

I am developing an application with many Parent-Child relationships which are leaving me with some modeling questions. Before I ask, let me give you some context: No aggregates While I am trying to ...
Philipp Murry's user avatar
-1 votes
1 answer
128 views

Currently in our web app, we have forms which define model and view in JSON (in-house library) on the client side. Example: And there is a component for each form, which has event handling logics ...
Saurabh Batra's user avatar
0 votes
1 answer
393 views

We are trying the Domain Driven Development (DDD) while working on a project. We've got a Product aggregate. We've got a ProductRepository to load/save Products. We've also got a Timeline aggregate, ...
user2190492's user avatar
0 votes
2 answers
128 views

I am practicing tactical DDD and having trouble as exemplified below. Fundamentally, whether some fields of the value object should be nullable depends on another field of the same value object. ...
STHA's user avatar
  • 71
1 vote
1 answer
93 views

So I've got a rather simple, mostly crud application I want to use DDD with, to learn/practice it. I wonder about aggregate design regarding a fuel tank entity. Each tank stores fill level readings (...
MikeP's user avatar
  • 13
5 votes
3 answers
383 views

I've been looking at DDD lately as part of playing with Spring Modulith, and I'm getting hung up a bit on how to approach events which cross between contexts. To provide a concrete example based on a (...
Simon Geard's user avatar

1
2 3 4 5
34