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.

Domain-driven design (DDD) is an approach to develop software for complex needs by connecting the implementation to an evolving model.

1610 questions
46
votes
4 answers

In DDD, is validation application logic, or domain logic?

Suppose that we are modelling a form using DDD; the form may have certain kind of business rules associated with it - perhaps you will need to specify an income if you are not a student, and you are required to list your children if you indicate…
Extrakun
  • 979
43
votes
3 answers

What, in reference to DDD, is a bounded context?

When working through the book "Implementing Domain Driven Design" by Vaughn Vernon, I have been unable to gain a good grasp on what a bounded context actually is. The book defines a bounded context as "a conceptual boundary where a domain model is…
Michael
  • 6,457
27
votes
3 answers

What is Domain Driven Development in practical terms?

I heard about Domain Driven Development from a developer in the area. He talked it up like it was just about the silver bullet to changing requirements. I read the wiki. Still not too clear. What is "3D" in practical terms? Is it really that…
23
votes
2 answers

DDD - Are 'use cases' and 'application services' different names for the same thing?

I'm struggling a little bit with Domain Driven Design because there are so many names and concepts to grasp. Today it striked me to know what is exactly the difference between an 'application service' and an 'use case'. Are they the same thing?
18
votes
3 answers

DDD: should User be a domain concept?

Let's take some blogging application. User in this application has email, password. When a new user is registered, he should activate his account (for example, via email). But... is account activation, password, password reset tokens, etc, are…
Teimuraz
  • 482
18
votes
5 answers

How to treat validation of references between aggregates?

I'm struggling a bit with referencing between aggregates. Let's assume the aggregate Car has a reference to the aggregate Driver. This reference will be modelled by having Car.driverId. Now my problem is how far should I go to validate the creation…
16
votes
3 answers

How to work with large aggregate roots?

I'm learning DDD and yet I have more questions than answers. Let's consider a model of a directory containing enormous number of files. Here is how I see it: Directory is an Aggregate root. This entity should have the validation logic of checking…
16
votes
3 answers

When should an Aggregate Root contain another AR (and when should it not)

Let me begin by first apologizing for the length of the post, but I really wanted to convey as much detail up-front so I don't take your time going back and forth in comments. I am designing an application following a DDD approach and am wondering…
SonOfPirate
  • 2,915
15
votes
2 answers

What question is answered by DDD?

What is the problem that is solved by Domain Driven Design? I understand what Object Oriented Programming brought and see the issues it addressed and how, and in what aspect/scenaria, it made the live of a developer easier. But I so far failed to…
14
votes
3 answers

DDD Domain Models and Business Logic

I'm a seasoned programmer but a novice with DDD. I have a project that I'm trying to implement with DDD and my understanding is that there is some ambiguity with regard to the use of domain models and application services. In the purest of DDD…
Andy
  • 407
13
votes
2 answers

DDD - Aggregate root with large number of children

I'll preface this question by saying I am relatively new to DDD so I may be making some fundamental mistakes here! I working on a project which involves the concepts of Accounts and Transactions (in the financial sense). An Account can have many…
krixon
  • 133
12
votes
1 answer

Can clients call methods on entities other than the aggregate root?

Evans introduces in his book "Domain Driven Design" in Chapter 6 "Aggregates" the concept of Aggregates. He further defines rules to translate that concept into an implementation (Evans 2009, pp. 128-129): The root ENTITY can hand references to the…
11
votes
1 answer

How to deal with queries that do not return full entities in Domain Driven Design?

In my application, I have a listing of information that is deducted from a query that combines information from several entities. In itself, a very common situation. Now, the corresponding repository method should return a list that contains items…
11
votes
2 answers

Should I use the repository in the Domain Object or push the Domain Object back to the Service Layer?

I have come from a transaction script world and I am just starting to take a look at DDD. I am unsure of the correct way to integrate a DDD design with database persistence. This is what I have: A service class called OrganisationService whose…
MrLane
  • 629
11
votes
4 answers

What is a value object in domain-driven design?

I have an entity and I've realised that there is a group of properties that work together. So, I moved them to a value object (together with their behavior) and now I have a reference from my entity to this value object. I've read "Domain Driven…
JD01
  • 1,289
1
2 3
13 14