Re: Responsibilities of ApplicationServices versus DomainServices
Wim van Gool <[email protected]>
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <CAKqMafyDEBb4AYTbJi6K24Tm9+fvyDWDYV44deSMwmEQ393L2A@mail.gmail.com> |
Jorg, I think that's quite typical and I let ApplicationServices use the repositories directly for adding and deleting aggregates too - but this means that the Application Service is also responsible for raising the Aggregate-X-Added-Events and Aggregate-X-Removed-Events, which I think is OK, but I can imagine some people feel this is a domain-concerns (raising Domain Events, that is). On Mon, May 27, 2013 at 1:05 PM, Jorg Heymans <[email protected]>wrote: > ** > > > *Remaining questions*: > >> - Which service would you use to implement adding/removing aggregates and >> raise the appropriate DomainEvent? >> > > In our case applicationService.removeAggregate(id) delegates to > aggregateRepository.remove(id), why would you need a service in between ? > > Jorg > > >