Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. What is an Anaemic Domain Model
  2. What we were facing were the problems generated by an Anaemic Domain Model. An Anaemic Domain Model is a model with no logic in it. Domain classes look more like a bunch of public setters and getters without domain logic where the client of the class has control over how to instantiate and modify the class. In these models, the client has to interpret the class purpose and use. Usually, the logic has been pushed to other classes called something like services, helper or manager plus the name of the domain class. With the logic sitting in another class, there is nothing that helps the client to navigate or use the model class.
  3.  
  4. This approach leads to many design problems and disadvantages:
  5.  
  6. Encapsulation is violated
  7. Hard to maintain
  8. Duplicated business logic
  9. Cannot assure the entities in the model are in a consistent state
  10. Low cohesion
  11. Favours gap and misunderstanding between development and business
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement