Wrap-Up
In this chapter we discussed what a Domain Service is and what it is not, and we analyzed when we should use a Service rather than an operation on an Entity or Value Object. There was more:
• You learned that recognizing a legitimate need for a Service is necessary to avoid overusing Services.
• You were reminded that overuse of Domain Services leads to Anemic Domain Model, an anti-pattern.
• You saw the specific steps of general practice when implementing a Service.
• You considered the pluses and minuses of using a Separated Interface.
• You reviewed a sample calculation process from the Agile Project Management Context.
• Finally, you considered how to provide exemplary tests to demonstrate how to use the Services our models provide. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access