Inside an Application Service
Looking at A+ES inside an Application Service (4, 14) demonstrates the big picture. It’s common for Aggregates to reside inside a domain model behind Application Services, which serve as the direct clients of the domain model.
When an Application Service receives control, it loads an Aggregate and retrieves any supporting Domain Services (7) needed by the Aggregate’s business operation. When the Application Service delegates to the Aggregate business operation, the Aggregate’s method produces Events as the outcome. Those Events mutate the state of the Aggregate and are also published as notifications to all subscribers. The Aggregate’s business method may require passing one or more Domain Services as parameters. ...
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