IT:AD:Patterns:CQRS
Summary
Command and Query Responsibilty Segration (CQRS) is the application of the “Command/Query Separation Principle” of separating data retrieval from data modification by using Query and Command objects.
Strategy
- Advantages:
- Well suited to Design by Contract (DbC).
- Makes code more legible.
- Considerations:
- Not great in multi-threading environment or reentrant.
Resources
* http://martinfowler.com/bliki/CQRS.html * http://weblogs.asp.net/shijuvarghese/cqrs-commands-command-handlers-and-command-dispatcher * http://www.adamtibi.net/06-2013/implementing-a-cqrs-based-architecture-with-mvc-and-document-db * http://paulstovell.com/blog/clean-aspnet-mvc-controllers * https://medium.com/@hugo.oliveira.rocha/what-they-dont-tell-you-about-event-sourcing-6afc23c69e9a