RES: Should an application service handles the orchestration of dispatching domain events?
"'Sergio T. Uetanabaro' [email protected] [domaindrivendesign]" <[email protected]> Tue, 12 May 2015 10:55:58 +0000
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <24A9A9F6D939954DA2D19698B53E8522CC0C9F4B@SRV-EXCHANGE.allbras.com.br> |
Good article: http://www.jayway.com/2013/06/20/dont-publish-domain-events-return-them/ Att. Suka ________________________________ De: [email protected] [[email protected]] Enviado: segunda-feira, 11 de maio de 2015 15:06 Para: [email protected] Assunto: [domaindrivendesign] Should an application service handles the orchestration of dispatching domain events? 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? ________________________________ ALLBRAX | CREATIVE E-GOV SOLUTIONS Sergio T. Uetanabaro Diretor Técnico • +55 16 3515-5200 Ramal 5213 - Ribeirão Preto/SP • [email protected]<mailto:[email protected]> Antes de imprimir pense em sua responsabilidade e compromisso com o MEIO AMBIENTE!