What is the difference between CQS and CQRS patterns?

1 · Arnaud Langlade · Feb. 6, 2023, 1:45 p.m.
I recently found out that I did not grasp those design patterns. There are a lot of resources on the Internet about them but they are not always accurate. That’s a shame because they are pretty simple. I will share my understanding of them with you. What is Command Query Segregation (CQS)? The fundamental idea is that we should divide an object’s methods into two sharply separated categories: Queries: Return a result and do not change the observable state of the system (are free of side effect...