9 Feb 15:07
Re: EventSourcing and evolving behavior
Jérémie <Jeremie.Chassaing <at> gmail.com>
2010-02-09 14:07:19 GMT
2010-02-09 14:07:19 GMT
The events should contain the result of business rules. When you replay events, you just get the result of those old computations from passed events. No need to change the logic. Let's say that before 2010-01-01 there was a logic tax calculation. The entity threw events containing taxes computed using this logic. After 2010-01-01, the logic change, but when an event thrown before that date is replaid, you just get the tax value, no new calculation occures. This is one of the benefits of storing events instead of commands. cheers, jeremie / thinkbeforecoding --- In domaindrivendesign <at> yahoogroups.com, Nuno Lopes <nbplopes@...> wrote: > > Most often sum you don't revert state. You perform business transactions > that put it back in the state you need it to be. > > On Tue, Feb 9, 2010 at 10:50 AM, Nuno Lopes <nbplopes@...> wrote: > > > > And if you revert state of the entity, you might have to revert the > > behavior also. > > > > This is not a challenge specific to this pattern but software in general. > > Usually the domain resolves it in an elegant and simple way. > > > > Cheers, > > > > Nuno > > > > > ------------------------------------
RSS Feed