Should an application service handles the orchestration of dispatching domain events?
"Marco Paul [email protected] [domaindrivendesign]" <[email protected]> Mon, 11 May 2015 14:06:08 -0400
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <CAMRntEjhY2uA9zSS+SiCx2FPPn7pyn=b5uhng10+sbxB+3338g@mail.gmail.com> |
for example, let's say I have a Customer object with a ChangeAddress method in which returns a CustomAddressChanged event. Should the application service have the knowledge to go ahead an put the event on the message bus, maybe send an e-mail to the user, hand it off to an in-process handler OR should the app service just go ahead and use some domain service to dispatch the event and whatever handlers are listening can do what it needs to do?