What is CQRS?
CQRS is an architecture that recognises that the model used to display or query data differs to the model used to insert or update data. By splitting your application into separate legs - one for Command and one for Query - you can tune and scale each independently to match the usage characteristics of your application.
Other advantages:
1) Reduces the model contention that typically happens if you have a large team of developers working on the same application.
2) Insulates areas from each other - it is much less likely that a change in one area will impact another area.
3) Allows for more/easier testing as each module only needs the tiny part of the model it directly impacts to be mocked rather than the whole model.
CQRS is ideally suited to web applications because, down at the deepest level all web applications are sitting on top of a CQRS system :- HTTP. Matching your application architecture to this can significantly reduce the headaches of trying to bolt things like data concurrency onto an essentially stateless environment.
CQRS is nearly always paired with domain driven design (DDD) and event sourcing (ES) but this is not mandatory - you can build CQRS into an application that sits on a single SQL server database and uses fairly standard CRUD technologies and has a MVC front end if you so desire. However the true "enterprise" advantage comes from using these three technologies together.
Related concepts
* How cloud computing requires us to rethink application development
CQRS is an architecture that recognises that the model used to display or query data differs to the model used to insert or update data. By splitting your application into separate legs - one for Command and one for Query - you can tune and scale each independently to match the usage characteristics of your application.
Other advantages:
1) Reduces the model contention that typically happens if you have a large team of developers working on the same application.
2) Insulates areas from each other - it is much less likely that a change in one area will impact another area.
3) Allows for more/easier testing as each module only needs the tiny part of the model it directly impacts to be mocked rather than the whole model.
CQRS is ideally suited to web applications because, down at the deepest level all web applications are sitting on top of a CQRS system :- HTTP. Matching your application architecture to this can significantly reduce the headaches of trying to bolt things like data concurrency onto an essentially stateless environment.
CQRS is nearly always paired with domain driven design (DDD) and event sourcing (ES) but this is not mandatory - you can build CQRS into an application that sits on a single SQL server database and uses fairly standard CRUD technologies and has a MVC front end if you so desire. However the true "enterprise" advantage comes from using these three technologies together.
Related concepts
* How cloud computing requires us to rethink application development