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

learn more… | top users | synonyms (1)

12
votes
5answers
4k views

Is it bad practice for services to share a database in SOA?

I have recently been reading Hohpe and Woolf's Enterprise Integration Patterns, some of Thomas Erl's books on SOA and watching various videos and podcasts by Udi Dahan et al. on CQRS and Event Driven ...
39
votes
7answers
3k views

Can a system be 100% Data Driven?

My new boss has been working on this project for many years. I've only been here a few weeks, but I am not sure it's possible. He would like to design a system that is "100% data driven". So if we ...
20
votes
3answers
5k views

Where we should put validation for domain model

I still looking best practice for domain model validation. Is that good to put the validation in constructor of domain model ? my domain model validation example as follows: public class Order { ...
3
votes
3answers
3k views

DDD + POCO does this makes sense?

DDD promotes rich domain models with behavior in it, POCO naked objects without any objects in it. Is it possible to have them both combined? I have a Multi Layer Solution Core - has POCO ...
9
votes
3answers
2k views

Validation and authorization in layered architecture

I know you are thinking (or maybe yelling), "not another question asking where validation belongs in a layered architecture?!?" Well, yes, but hopefully this will be a little bit of a different take ...
5
votes
3answers
2k views

DDD - Aggregate Roots - Dealing with Efficiency and Concurrency

First off, I'll admit that I'm a newbie to DDD and need to read the "blue book". I'm building a system that has an AggregateRoot of type "Match". Each Match can have a collection of "Votes" and also ...
3
votes
1answer
1k views

Recovering an anemic domain model into a multitier architecture

I have spent the past several days learning about domain driven design and attempting to apply it to a current project. I decomposed the problem domain into the canonical logical components: domain, ...
3
votes
2answers
1k views

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 ...
49
votes
5answers
6k views

With all of these services, how can I not be anemic?

Where do we draw the line between delegation and encapsulation of business logic? It seems to me that the more we delegate, the more anemic we become. However, delegation also promotes reuse and the ...
32
votes
3answers
6k views

Rich Domain Models — how, exactly, does behavior fit in?

In the debate of Rich vs. Anemic domain models, the internet is full of philosophical advice but short on authoritative examples. The objective of this question is to find definitive guidelines and ...
19
votes
10answers
5k views

Best practice or design patterns for retrieval of data for reporting and dashboards in a domain-rich application

First, I want to say this seems to be a neglected question/area, so if this question needs improvement, help me make this a great question that can benefit others! I'm looking for advice and help from ...
13
votes
2answers
3k views

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 ...
6
votes
6answers
10k views

Application layer vs domain layer?

I am reading Domain-Driven Design by Evans and I am at the part discussing the layered architecture. I just realized that application and domain layers are different and should be separate. In the ...
13
votes
2answers
2k views

Domain-Driven-Design - external dependencies in the Entity problem

I'd like to start Domain-Driven-Design, but there are several problems I'd like to solve before starting :) Let's imagine I have a Groups and Users and when user wants to join a group, I'm calling ...
5
votes
1answer
1k views

Unique Value Object vs Entity

Trying to convert some entities into value objects I am stuck in a case where what seems a value object must be unique within an aggregate. Suppose we have a Movie entity which makes the root of an ...
1
vote
1answer
200 views

Cascading deletes from an aggregate root through out the entire aggregate doesn't make sense

Based on the same example for this question. Within the Pro ASP.Net MVC 4 by Adam Freeman, there is a discussion on aggregates and aggregate roots with a simple auction system. There are members who ...
3
votes
7answers
1k views

Inheritance using non-abstract base class

This post is based on the question http://stackoverflow.com/questions/49002/prefer-composition-over-inheritance/11758048#comment15634305_11758048. Some people said - check whether there is “is-a” ...
4
votes
1answer
225 views

Should I be using separate 'domain' layer?

I have been reading a lot about domain layer and DDD. However I am still confused about it. To me they seem to be a fancy name for business classes however more modelled towards your application ...
1
vote
1answer
116 views

Domain-specific Interfaces

Are there any real benefits of using interfaces over abstract classes in a domain model? Does anyone have any experience using interfaces in a domain model in a real project? From a technical ...
1
vote
4answers
1k views

Can an aggregate root hold references of members of another aggregate root?

I know that outside of aggregates I can't change anything inside an aggregate without passing by his root. That said I would like to know if an aggregate root can hold references of members (objects ...
4
votes
4answers
376 views

Data access for composable applications

I'm wondering if anyone can share their thoughts, experience and guidance on how to approach the data access layer for a composable application? By composable application, I mean an application with ...
3
votes
1answer
275 views

Is depending on lazy loading a code smell?

During my short experience with DDD I often find myself in the situation where I wished for some type of lazy loading mechanism to solve some dangerous cases where large nested data sets might be ...
3
votes
1answer
1k views

CQRS + Event Sourcing: (is it correct that) Commands are generally communicated point-to-point, while Domain Events are communicated through pub/sub?

Didn't know how to shorten that title. I'm basically trying to wrap my head around the concept of CQRS ( http://en.wikipedia.org/wiki/Command-query_separation) and related concepts. Although CQRS ...
1
vote
1answer
212 views

Doubts about architectural pattern for customizable standard enterprise application [duplicate]

My company needs to build an application to be rolled out for a lot of clients. This software will have many modules and functionalities, but some of these will need specific adjustments for some ...
0
votes
1answer
128 views

What is the best way to create DTOs from entities and update entities from DTOs in a layered architecture?

Option 1: At first I would make a call to my service layer, which served as an API for my core domain, to get a domain object or a list of domain objects and then pass them into the assembler which ...
0
votes
2answers
141 views

Which layers should reflect the domain language (if a domain language can strictly exist)?

This question relates to a one I asked earlier: http://stackoverflow.com/questions/5448574/under-what-conditions-could-we-justify-an-attempt-to-introduce-a-one-size-fits-al When re-reading ...