Skip to content

Commit 500c1d9

Browse files
authored
Fix typo in domain-events-design-implementation.md (#20647)
* Fix typo in domain-events-design-implementation.md * Fix another typo in domain-events-design-implementation.md * Fix typo revert
1 parent 7fb1d2a commit 500c1d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/architecture/microservices/microservice-ddd-cqrs-patterns/domain-events-design-implementation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ The next question is how to raise a domain event so it reaches its related event
126126

127127
Udi Dahan originally proposed (for example, in several related posts, such as [Domain Events – Take 2](https://udidahan.com/2008/08/25/domain-events-take-2/)) using a static class for managing and raising the events. This might include a static class named DomainEvents that would raise domain events immediately when it is called, using syntax like `DomainEvents.Raise(Event myEvent)`. Jimmy Bogard wrote a blog post ([Strengthening your domain: Domain Events](https://lostechies.com/jimmybogard/2010/04/08/strengthening-your-domain-domain-events/)) that recommends a similar approach.
128128

129-
However, when the domain events class is static, it also dispatches to handlers immediately. This makes testing and debugging more difficult, because the event handlers with side-effects logic are executed immediately after the event is raised. When you are testing and debugging, you want to focus on and just what is happening in the current aggregate classes; you do not want to suddenly be redirected to other event handlers for side effects related to other aggregates or application logic. This is why other approaches have evolved, as explained in the next section.
129+
However, when the domain events class is static, it also dispatches to handlers immediately. This makes testing and debugging more difficult, because the event handlers with side-effects logic are executed immediately after the event is raised. When you are testing and debugging, you just want to focus on what is happening in the current aggregate classes; you do not want to suddenly be redirected to other event handlers for side effects related to other aggregates or application logic. This is why other approaches have evolved, as explained in the next section.
130130

131131
#### The deferred approach to raise and dispatch events
132132

0 commit comments

Comments
 (0)