Command Query Responsibility Segregation (CQRS) is a pattern in which the model that is used to read information is separated from the model that is used to update information. In a more traditional architecture, a single object model is used for both reading and updating data:
Compromises become necessary in order to use a single object model as domain classes are required to serve all purposes. The same representation of an entity must support all of the create, read, update, and delete (CRUD) operations, making them larger than they need to be in all circumstances.
They contain all of the properties the object will need for various scenarios. If the class is more than just a data transfer object (DTO), it may also contain methods for behavior. With this approach, classes are not ideal for all of the situations in which...