Member-only story
This article is an answer to the benefits and drawbacks of CQRS under the light of the DDD practices.
The original article written by Hristiyan Pehlivanov can be found there.
Despite the provoking title, the article is well-balanced and you may find valuable insights there.
TL;DR : CQRS is not a silver bullet.
CQRS is not a silver bullet
Well, it’s obvious and despite what may say any Software Programming theorist, there is no perfect design pattern, architecture model that fits for all.
DDD, Onion Architecture, Clean architecture, both of these concepts rely on some good sense and one or two successful implementations in a given context.
CQRS has the same issue. Plus there are some misconceptions about it that confuse the practitioners.
CQRS maturity level
As I understand CQRS and practice it, I usually distinguish four levels of maturity
- CQS: Command and Query Segregation
- Read and Write model
- Read and Write Datastores
- Event sourcing
Level 1 : CQS: Command and Query segregation
This part is easy to understand. In your code, you should distinguish read and write operations and avoid as much as possible mixed…