Also After Greg went through this with me he suggested using an UoW
that gets registered in the AR where the AR will publish/register its
events to instead of keeping them locally. That way you can dispose
the AR before the transaction gets committed, and you are putting the
right responsibilities in the correct place. I just haven't found the
time to implement these changes.
-Mark
--
Mark Nijhof
m: 0047 95 00 99 37
e: mark....@cre8ivethought.com
w: www.cre8ivethought.com
"Walking on water and developing software from a specification are
easy if both are frozen."
-- Edward V Berard
@Neil I think one important part to this is also familiarity to the
concepts, meaning that once you understand the concepts being used
then navigating the code and understanding what happens when will be
so much easier. EDA is just very new to some people and for them it
will seem like magic :)
-Mark
--
I think you will find though that very often you can change the
problem/boundaries so that you don't need to break aggregate
boundaries.
Another option that we have in this example is to have a saga that
handles the process of closing an account. What is the process of
closing an account? Are other things involved? The domain would
generate out the "Account Closed" event then other things would be
triggered asynchronously off of this.
Also in this particular example we can quite simply avoid the 2
aggregates. You will notice that a "closed account" is being created.
Yes the closed account is a different object but could the closed
account just be created off the event stream of the original account
(eg: it is just a different view of the same event stream?). It would
seem to me that this could be done relatively easily.
Cheers,
Greg
--
Les erreurs de grammaire et de syntaxe ont été incluses pour m'assurer
de votre attention
It is a very common pattern to model these things as different
objects. With events however these things are generally just different
views of the same event stream (its not a new aggregate for each one).
Cheers,
Greg
Greg
--
With something like an account open/closed even the snapshots will
likely be the same. The objects are only behaviorally different (eg
they offer different roles).
Greg
--