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.

1562 questions
225
votes
11 answers

Why do we need so many classes in design patterns?

I am junior developer among seniors and am struggling a lot with understanding their thinking, reasoning. I am reading Domain-Driven Design (DDD) and can't understand why we need to create so many classes. If we follow that method of designing…
user1318496
  • 1,767
  • 4
  • 9
  • 11
118
votes
6 answers

What is a domain?

I see this term a lot in the context of software architecture ("domain-model", "domain-driven-design" etc.). I have googled it, but I get tons of different definitions. So what is it really?
101
votes
5 answers

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 DRY principal. So what is appropriate to delegate…
SonOfPirate
  • 2,885
  • 4
  • 25
  • 28
98
votes
4 answers

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 concrete examples of proper Domain-Driven Design…
RJB
  • 2,090
  • 1
  • 14
  • 11
96
votes
6 answers

Difference between a service class and a Helper class

I would like to know what differentiates a Service class from a utility class or a helper class? A class only with underlying methods calls the dao's is a service? Doesn't the usage of Helper classes violates SRP?
tintin
  • 1,233
  • 1
  • 10
  • 7
85
votes
7 answers

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 project I am working on, they are kind of blended…
Louis Rhys
  • 6,042
  • 11
  • 42
  • 59
82
votes
4 answers

Programming and Ubiquitous Language (DDD) in a non-English domain

I know there are some questions already here that are closely related to this subject but none of them take Ubiquitous Language as the starting point so I think that justifies this question. For those who don't know: Ubiquitous Language is the…
Sandor Drieënhuizen
  • 1,135
  • 10
  • 15
60
votes
4 answers

DDD repositories in application or domain service

I m studying DDD these days, and I m having some questions concerning how to manage repositories with DDD. Actually, I have met two possibilies : First one The first way of manage services I've read is to inject a repository and a domain model in an…
mfrachet
  • 1,481
  • 3
  • 15
  • 21
56
votes
6 answers

Are DDD Aggregates really a good idea in a Web Application?

I'm diving in to Domain Driven Design and some of the concepts i'm coming across make a lot of sense on the surface, but when I think about them more I have to wonder if that's really a good idea. The concept of Aggregates, for instance makes sense.…
Erik Funkenbusch
  • 2,768
  • 3
  • 22
  • 27
55
votes
5 answers

Is it still valid to speak about anemic model in the context of functional programming?

Most of DDD tactical design patterns belong to object-oriented paradigm, and anemic model describes the situation when all business logic is put into services rather than objects thus making them a kind of DTO. In other words anemic model is a…
Pavel Voronin
  • 1,640
  • 1
  • 18
  • 25
51
votes
4 answers

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 { private readonly List _lineItems; …
adisembiring
  • 623
  • 1
  • 6
  • 6
50
votes
8 answers

Is domain driven design an anti-SQL pattern?

I am diving in the domain driven design (DDD) and while I go more deeply in it there are some things that I don't get. As I understand it, a main point is to split the Domain Logic (Business Logic) from the Infrastructure (DB, File System,…
50
votes
11 answers

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 people who have implemented solutions that solve…
richard
  • 3,325
  • 2
  • 25
  • 39
50
votes
5 answers

How far should we rename code and data when end users nomenclatures change?

A long time ago we added a feature where our users could "Accept" an image after it was added to a workflow queue. Turns out, we used the wrong term, and users actually "Approve" the image. Changing Accept to Approve on our interface is easy, just…
inerte
  • 601
  • 4
  • 5
47
votes
2 answers

How do you handle shared concepts in a microservice architecture?

I am researching architectural patterns for an application I'm developing and a microservice approach seems like it would be a good choice but I am not sure how to handle interactions between the services. The application primarily deals with users,…
1
2 3
99 100