CQRS in a nutshell
CQRS is an abbreviation for Command and Query Responsibility Segregation. It means every single endpoint of an application either executes a command or retrieves data. Never both.
Many people refer to Greg Young when they talk about CQRS. He published this pdf which describes the concepts in depth. Greg Young points out that CQRS originated with Bertrand Meyer’s Command and Query Separation Principle and he summarises it as follows:
“Basically it boils down to: If you have a return value you cannot mutate state. If you mutate state your return type must be void.” — Greg…