Questions tagged [domain-driven-design]

Domain-driven design (DDD) is an approach to developing software for complex needs by deeply connecting the implementation to an evolving model of the core business concepts. Note that conceptual DDD questions are better to be asked at softwareengineering.stackexchange.com.

The premise of domain-driven design is the following:

  • Placing the project's primary focus on the core domain and domain logic
  • Basing complex designs on a model
  • Initiating a creative collaboration between technical and domain experts to iteratively cut ever closer to the conceptual heart of the problem.

Domain-driven design is not a technology or a methodology. DDD provides a structure of practices and terminology for making design decisions that focus and accelerate software projects dealing with complicated domains.

The term was coined by Eric Evans in his book of the same title: Domain-Driven Design: Tackling Complexity in the Heart of Software

Books

Sample Application

6728 questions
15
votes
3 answers

Is Domain Driven Design right for my project?

I have been reading this ebook about DDD and it says that only highly complex systems are suited for DDD architecture. This leads me to second guess my decision to move more towards DDD as my architecture. I am converting a classic ASP application…
jpshook
  • 4,834
  • 6
  • 36
  • 45
15
votes
1 answer

Can DDD repositories be aware of user context?

Say you were to develop a system which availability of entities and domain logic is highly dependent on user context. Would it make sense to handle the user context sensitivity within repositories by making individual repository instances user…
jpierson
  • 16,435
  • 14
  • 105
  • 149
15
votes
6 answers

DDD: Referencing MediatR interface from the domain project

I'm just getting started with DDD. I'm putting domain events into a CQRS application and I'm stumbling on a fundamental task: How to use the MediatR.INotification marker interface within the domain project without creating a domain dependency on…
platypusjh
  • 667
  • 1
  • 7
  • 16
15
votes
2 answers

Why are repositories only used for aggregates in Domain-Driven Design?

In DDD, repositories are used to perform serialization and de-serialization of aggregates, e.g. by reading and writing to a database. That way, aggregates can contain purer business logic, and won't be coupled to non-domain-specific persistence…
15
votes
1 answer

many to many relationship in ddd

I have two entities Publisher and SocialAccount. SocialAccount contains multiple accounts like Twitter, Facebook, etc. 1 publisher can attach to many social accounts and 1 social account contains multiple publishers, this social account is also…
chandra
  • 313
  • 1
  • 3
  • 8
15
votes
4 answers

Do DDD and SOA really play well together?

Please let me know, ever so gently, if I am totally mangling the DDD concept, but here is my dilemma. Let's say I have the following domain model: Teacher IList Class Teacher IList Student Class Now, from a DDD…
sydneyos
  • 4,527
  • 6
  • 36
  • 53
15
votes
2 answers

What software to use for Event Storming?

With regard to Event Sourcing and Domain Driven Design, I'm looking for a good software solution to help my team model our Aggregates electronically during an Event Storming session. I have considered simple sticky note applications but they leave a…
Velice Naumoski
  • 153
  • 1
  • 1
  • 4
15
votes
2 answers

Domain driven design: How to deal with complex models with a lot of data fields?

Well I am trying to apply domain driven design principles for my application, with a rich domain model that contains both data fields and business logic. I've read many DDD books, but it seems that their domain models(called entities) are very…
Lord Yggdrasill
  • 3,197
  • 4
  • 26
  • 42
15
votes
3 answers

DDD, difference between a Saga and an Event Dispatcher?

On multiple sites (e.g. here or here Sagas are described as a mechanism that listens to domain events and reacts to them, executing new commands, and finally modifying the domain, etc. Is there any difference between a Saga and a simple event…
fj123x
  • 6,904
  • 12
  • 46
  • 58
15
votes
1 answer

What approach is there for handling and returning errors (non-exceptional and exceptional) in Domain Driven Design entities and aggregate roots?

I'm trying to find a good article/examples of how DDD entities treat errors (and what would be considered exceptional errors and what wouldn't) and how they pass them up to the calling application layer (which usually wraps operations in a…
prograhammer
  • 20,132
  • 13
  • 91
  • 118
15
votes
2 answers

Are entity classes exclusive to one aggregate

After reading Evans and Vernon I still have one fundamental Question. I'm aware that of course one entity (instance) can only be in one aggregate. But can an entity class be used in multiple aggregates (classes)? For clarification, I ask on the…
Holger Thiemann
  • 1,042
  • 7
  • 17
15
votes
4 answers

A bounded context is a full application?

I've been reading about DDD and bounded contexts and I think I'm getting the idea wrong. At first, I liked the idea of subdomains and bounded contexts, I understood it like that: there's a software to be developed, but attacking all at once is too…
user1620696
  • 10,825
  • 13
  • 60
  • 81
15
votes
3 answers

Where logging should go in onion architecture with DDD

I am developing a console application using onion architecture and domain driven design. I have a two domains, where I need to implement logging, I confused where I can place the logging component. Can I place that in respective infrastructure of…
15
votes
4 answers

Should Entities in Domain Driven Design and Entity Framework be the same?

I have started using Entity Framework Code First for the first time and am impressed by the way in which our greenfield application is being built around the domain rather than around the relational database tables (which is how I have worked for…
15
votes
2 answers

Domain-driven design with Zend

This question is a continuation of my previous question here zend models architecture (big thanks to Bill Karwin). I've made some reading including this article http://weierophinney.net/matthew/archives/202-Model-Infrastructure.html and this…
mik
  • 1,575
  • 6
  • 22
  • 33