Slide 47
Slide 47 text
Stop creating anemic domain models, let them have behaviors
5
Domain object is the center of the design, it’s harder to change it if its operations don’t belong to it
All domain logic is in the services
Just a procedural style design
Breaks encapsulation, internal state of
objects become not internal at all
The logic that should be in domain object is:
business rules, validations, calculations,
anything not contradicting to SOLID
Service layer should be thin, it should
coordinate tasks, delegate work, and build
algorithms
Domain objects should not know anything of
the infrastructure