A Few Words About: CQRS


CQRS (or CQS), because the both names are used to identify the same pattern, is a abbreviation of Command and Query (Responsibility) Segregation.


Simply saying the CQRS means that you should split yours

read and writes into two models.


The reading model, is responsible for obtaining data. It should not have any side effects to a data storage.

Queries can use a simplified model without any validation.


On the other hand commands are used to update data. The command should not return any results.

Commands tends to use slower frameworks. As well as running all data verification and validation before save.


Common misconceptions

CQRS is not EventSourcing (ES). They come together very nicely but both could be used separately without any problems.

Blog comments powered by Disqus