Should we include domain events in the domain layer? #52
Replies: 3 comments
-
|
RE: should we have these in the event or domain layer? Domain events (if used), MUST be part of the domain layer in order to be consistently triggered |
Beta Was this translation helpful? Give feedback.
-
|
RE: if domain layer, how do we feel about the domain having a dependency on meditation? Ideally, the domain layer should not have any external dependency (as per clean architecture). However, keeping the domain layer clean would result in us having to re-invent the wheel and create our own implementation of domain events publishing and subscription. We may investigate this in future, but for now we have decided to take a dependency on MediatR in the domain layer. |
Beta Was this translation helpful? Give feedback.
-
|
RE: do we need this for all projects? Or just medium-large projects? No, we don't. In future, we will build a flag into the template so that domain events can be included or not. For example: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Domain events are a useful concept in DDD to allow us to loosely couple functionality based on events that happen in the system.
Beta Was this translation helpful? Give feedback.
All reactions