How to do event sourcing for complex aggregate roots
void PleaseDoSomeBehavior(Command behavior)
void PleaseDoSomeBehavior(int countOfSomething, string someInfoStringHere, Guid orderId)
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/dddcqrs.
For more options, visit https://groups.google.com/d/optout.
|
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
In greg's example in financial systems it makes sense, by placing an order to create maybe a partial succeeded orders and split the rest to a pending ask ot bid or somethings. But there, it is necessary. In your example you do to much for a simple command, at least the halve of your events are overhead.
In a context of another behaviours, it makes sense to have an fitting events for like change address oder email or something.
But for every property, every subentity only for the sake of having events that changes only on property is to munch in my opinion.
Keep it simple. If you have all these behaviors, you need all these events. Okay. But, keep it simple. Keep in mind, that you have to replay all these events. And it is more perfomant when a CreatedUser event already set the password and email and so one, instead generate for all these little steps an extra event,even if you had an separate command for changing the address that generates the addressChanged event.
As I longer think about your approach to split the create in small events, that are already there... It sounds good, even if it looks exessive in the first place. In the words of the greatest philosopher of my youth "Narf...!" :D thank you for the input.
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/dddcqrs.
For more options, visit https://groups.google.com/d/optout.
Pretty straightforward, and I'm surprised so few code examples posted here
use that template. Like, why not?
Domain agnostic? Reflection magic? What are you talking about? The example
I had was the aggregate as a function from command to a list of events. The
command is an instance of a specific command class. The events are
instances of specific event classes. What's this agnostic thing you speak
ok?