1
votes

Could you please tell me what is the difference between the model Anemic Domain Model and the DDD? what is the most used nowadays ? which model is relevent when using an application the spring framework (spring data ...)?

2

2 Answers

1
votes

See Martin Fowler, 2003.

The basic symptom of an Anemic Domain Model is that at first blush it looks like the real thing. There are objects, many named after the nouns in the domain space, and these objects are connected with the rich relationships and structure that true domain models have. The catch comes when you look at the behavior, and you realize that there is hardly any behavior on these objects, making them little more than bags of getters and setters.

The anemic domain model is really just a procedural style design, exactly the kind of thing that object bigots like me (and Eric) have been fighting since our early days in Smalltalk

the problem with anemic domain models is that they incur all of the costs of a domain model, without yielding any of the benefits.

1
votes

Anemic Domain Model is a bad thing - it's a poorly implemented DDD Domain Model where the domain objects contain little or no business logic. All the logic is in other services.