1

What is the difference between using domain services and domain events? The thing I can see is that domain events allow you to further decouple your domain model and get away from using domain services. It seems the simple implementation would be to use a service and then eventually refactor to using domain events.

Additionally, it seems odd that when using Domain Events I have to wire them up in the Application Code (IOC container or with Poor Man’s DI). For example let’s say I have an Order Aggregate that calls OrderCreated which triggers an update to they Inventory System. From everything I’ve seen, I have to wire this event and event handler in application code. Again, domain services seem simpler and more encapsulated. Domain events do not seem adequate for domain-to-domain events but rather domain-to-application events.

Am I understanding this correctly or is there a much higher-level concept I'm missing?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.