--
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.
For more options, visit https://groups.google.com/d/optout.
To my understanding, aggregates should completely encapsulate the business rules.
I prefer aggregates to only accept and emit messages - commands are basically a parameter object.
Unfortunately I am stuck, because I don't see an obvious way to avoid a long list of function pairs. However, in my experience the more separation between the validate and apply methods, the more likely a Dev will forget to update one or the other.
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
I would prefer not to have a "command handler" for every aggregate - a framework should be able to automatically dispatch the command to the appropriate handler on the aggregate and save the result. Ideally, I can pipeline a command handler only when I need it - ie to orchestrate a domain service or policy/saga.
Thanks for the response. Yes, my expectation is low level validation will occur in my value objects which, for inputs, are composed into the command object and then passed to the aggregate. To avoid wasting resources, I prefer this type of validation to occur as early as possible. The aggregate should only need to validate that the command is not null/missing and then focus on any business rules given its current state.
I would prefer not to have a "command handler" for every aggregate - a framework should be able to automatically dispatch the command to the appropriate handler on the aggregate and save the result. Ideally, I can pipeline a command handler only when I need it - ie to orchestrate a domain service or policy/saga.
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
Yes, I'm definitely advocating to have a split between them. This is a Greenfield project, which we've built a POC for...so plenty of room to rejig at the moment
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
I think you and I agree. Unfortunately, I've been having a hard time convincing my team of the same.
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.