From 500c1d90ffa18783bb0ab9f0494922a36bdfc1b8 Mon Sep 17 00:00:00 2001 From: Zakaria <23211915+zakaria-c@users.noreply.github.com> Date: Thu, 17 Sep 2020 15:37:32 +0200 Subject: [PATCH] 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 --- .../domain-events-design-implementation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/domain-events-design-implementation.md b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/domain-events-design-implementation.md index df1e8d50810b0..7576363ef3a25 100644 --- a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/domain-events-design-implementation.md +++ b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/domain-events-design-implementation.md @@ -126,7 +126,7 @@ The next question is how to raise a domain event so it reaches its related event 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. -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. +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. #### The deferred approach to raise and dispatch events