Some implementations of long list of commands follow a logical flow as
- retrieve the state
- run the command
- store the events
- update the cache
(note: in a separate branch I want that between of 3 and 4 there will also be the 'send messages to a message bus')
This flow is reasonable but the details may make it expose nitty-gritty details that exploded in dozens of lines of code.
Can you simplify it and prove that everything is still fine because all the tests still run and, moreover, you added specific
new tests about?
Consider that the idea of using 'preexecuted commands' (aimed to make the command execution agnostic respect to
its specific type) may help at it (not sure).
Some implementations of long list of commands follow a logical flow as
(note: in a separate branch I want that between of 3 and 4 there will also be the 'send messages to a message bus')
This flow is reasonable but the details may make it expose nitty-gritty details that exploded in dozens of lines of code.
Can you simplify it and prove that everything is still fine because all the tests still run and, moreover, you added specific
new tests about?
Consider that the idea of using 'preexecuted commands' (aimed to make the command execution agnostic respect to
its specific type) may help at it (not sure).