When it comes to change the state of an aggregate whether it's an addition, a deletion or a modification, it's probably a better idea not to have the same flow as when we read it.
The CQRS (command query responsibility segregation) design pattern is a way to fix that issue by defining a clear separation between the read and the write model.
We need to have this kind of feature inside our solution.
What should be included:
an abstract Command object will give a draft of how to create a command,
define what a CommandHandler should look like (class responsible of handling a command)
create a CommandDispatcher (looks like an EventDispatcher but for command)
When it comes to change the state of an aggregate whether it's an addition, a deletion or a modification, it's probably a better idea not to have the same flow as when we read it.
The CQRS (command query responsibility segregation) design pattern is a way to fix that issue by defining a clear separation between the read and the write model.
We need to have this kind of feature inside our solution.
What should be included: