Chapter 5 - Event Sourced aggregates are hard to refactor
continues from Chapter 4 - The larger the Aggregate, the greater the contention ...... What if we realize only in an advanced stage of development that we have modeled the aggregate incorrectly? Of course, it depends! If we are using State Persisted Aggregates, we could transform the aggregates with some scripts. If we are using Event Sourced Aggregates, the situation gets complicated. This is the representation of an event store; the highlighted events belong to a specific instance of the Course aggregate. If we decide to refactor this aggregate, replacing it with the CourseSubscription and CourseInfo aggregates, we need to rewrite the event store. The course creation event is replaced by two events for the creation of the two new aggregates: CourseSubscription and CourseInfo. The other events belonging to the Course aggregate are replaced by events belonging to the CourseInfo or the CourseSubscription aggregates. The color represents the new aggregate instance. Here w...