A domain model is composed of the objects, behavior, relationships, and attributes that make up the industry that is the focus of development.
Questions tagged [domain-model]
330 questions
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?

Michael Haddad
- 2,651
- 3
- 17
- 27
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
56
votes
20 answers
Must developers understand the business domain or should the specification be sufficient?
I work for a company for which the domain is really difficult to understand because it is high technology in electronics, but this is applicable to any software development in a complex domain.
The application that I work on displays a lot of…

Jerome C.
- 229
- 3
- 7
50
votes
7 answers
Why is inheritance bad in a Person-Student model?
I've just started learning about Inheritance vs Composition and it's kind of tricky for me to get my head around it for some reason.
I have these classes:
Person
class Person
{
public string Name { get; set; }
public int Age { get; set; }
…

Octavian Niculescu
- 619
- 3
- 5
37
votes
7 answers
Modeling first and lastname separately
Which arguments should someone consider when designing a new system and has to either store the name of a person as one field or separately as first/last name?
Pros for single field:
Simpler UI
No ambiguity when trying to enter the name of a…

Istvan Devai
- 495
- 1
- 4
- 7
37
votes
7 answers
Do RESTful APIs tend to encourage anemic domain models?
I'm working on a project in which we are trying to apply both domain-driven design and REST to a service-oriented architecture. We aren't worrying about 100% REST compliance; it would probably be better to say we are trying to build…

Kazark
- 1,810
- 1
- 17
- 37
33
votes
15 answers
Saying "no" to people asking questions
Possible Duplicate:
When do you not give help to less experienced programmers?
Currently, I am finding a lot of my day is taken up by people asking domain knowledge/system questions. This impacts personal productivity.
Should developers learn…

Moose
- 201
- 2
- 4
31
votes
9 answers
Is extracting an interface just for testing purposes a code smell?
I will explain with an hypothetical example.
Suppose that my domain is Cars. Everyone around the software, talks about cars. Car is the aggregate root of aggregate roots. For example, CAR table has 150+ columns in database (irrelevant for this…

George Z.
- 705
- 4
- 11
29
votes
4 answers
Is there an industry standard for gender model other than male and female?
I am modeling a database that should be used as generic non-functional requisite for all services of the startup company, like persons, users, services and commercial data like coupons, signature packages, etc.
I am thinking about the gender model.…

NaN
- 549
- 4
- 10
29
votes
9 answers
When is primitive obsession not a code smell?
I have read plenty of articles recently that describe primitive obsession as a code smell.
There are two benefits of avoiding primitive obsession:
It makes the domain model more explicit. For example, I can talk to a business analyst about a Post…

w0051977
- 7,031
- 6
- 59
- 87
21
votes
4 answers
Clean architecture validation in domain vs data persistence layer?
I'm studying up on clean and as a result am quite dramatically rethinking a great deal of how I design and write software.
I've thing I'm still wrestling with however, is for business rules like "on save updates to some item, first load All the list…

Dale Holborow
- 321
- 1
- 2
- 7
19
votes
3 answers
How do you push Design changes in TDD in late development stage
I was recently part of a TDD development team. At certain point I realized that there is a design mistake instead of Object Oriented Design and Structural design the problems were solved via statuses. Tens of statuses. For a brief moment I thought -…

Alexander Petrov
- 927
- 5
- 14
17
votes
6 answers
DDD Injecting Services on Entity Methods Calls
Short format of question
Is it within best practices of DDD and OOP to inject services on entity method calls?
Long format example
Let's say we have the classic Order-LineItems case in DDD, where we have a Domain Entity called an Order, which also…

e_i_pi
- 839
- 1
- 7
- 18
16
votes
2 answers
Is domain/persistence model isolation usually this awkward?
I'm diving into the concepts to Domain-Driven Design (DDD) and found some principles strange, especially regarding the isolation of domain and persistence model. Here is my basic understanding:
A service on the application layer (providing a…

Double M
- 446
- 3
- 8
16
votes
3 answers
Are Domain Objects in Domain Driven Design only supposed to be write-only?
I've been reading about Domain Driven Design for almost two years and have been cautiously been introducing some concepts in to my daily work or at least making plans for how things I do regularly could be done within a Domain Driven Design.
One…

jpierson
- 301
- 3
- 7