Reputation: 391
This may be a dumb question, but I don't know how to solve this.
I am moving from CRUD to Domain-Driven Design with CQRS.
I have seen many DDD examples like this. You could find many more on Github.
The domain model has methods like changeDetails
, addSomething
, removeSomething
, etc., and the commands could be just like that.
But in the UI, I have only 1 page with all its information, and everything is updated by clicking a single Save button.
How could I trigger all of the commands in 1 click?
If all commands are triggered and 1 fails, could the information be inconsistent?
Upvotes: 0
Views: 166
Reputation: 19921
When you get to this problem, I think you need to redesign your UI and create a more task based UI, you do change one thing at the time. Just like for example when you buy something on Amazon.com, then you don't complete your order with just one big save button, instead it takes you on a journey, adding credit card details, selecting shipping, adding address, confirming the order.....
see this video Finding your service boundaries: a practical guide
Upvotes: 3