August 2018
Beginner
594 pages
22h 33m
English
One way to overcome the challenges of using a single object model for both queries and commands is to separate the two. This pattern, known as CQRS, results in two separate models. The query model is responsible for reads and the command model is responsible for updates:

Query objects only return data and do not alter state, while command objects alter state and do not return data. Another way of looking at this concept is that asking a question (a query) should not alter the answer. In order to perform an action that will mutate state, a command is used.
When the system needs to read data, it goes through ...