docs: update cqrs

This commit is contained in:
Ilkka Seppälä committed 2024-05-24 20:26:32 +03:00
1 parent 47ee0b3a70
commit d58eeab8cb
1 file changed
+11 -7
@@ -14,7 +14,7 @@ tag:
## Intent ## Intent
Command Query Responsibility Segregation (CQRS) aims to segregate the operations that modify the state of an application (commands) from the operations that read the state (queries). This separation allows for more flexible and optimized designs, especially in complex systems. Command Query Responsibility Segregation aims to segregate the operations that modify the state of an application (commands) from the operations that read the state (queries).
## Explanation ## Explanation
@@ -26,6 +26,10 @@ In plain words
> The CQRS design pattern separates the actions of modifying data (commands) from the actions of retrieving data (queries) to enhance performance, scalability, and maintainability in software systems. > The CQRS design pattern separates the actions of modifying data (commands) from the actions of retrieving data (queries) to enhance performance, scalability, and maintainability in software systems.
Microsoft's documentation says
> CQRS separates reads and writes into different models, using commands to update data, and queries to read data.
**Programmatic Example** **Programmatic Example**
One way to implement the Command Query Responsibility Segregation (CQRS) pattern is to separate the read and write operations into different services. One way to implement the Command Query Responsibility Segregation (CQRS) pattern is to separate the read and write operations into different services.
@@ -50,7 +54,7 @@ This separation of concerns allows for flexibility in how the application handle
## Class diagram ## Class diagram
![alt text](./etc/cqrs.png "CQRS") ![CQRS](./etc/cqrs.png "CQRS")
## Applicability ## Applicability
@@ -87,10 +91,10 @@ Trade-Offs:
## Credits ## Credits
* [Patterns, Principles, and Practices of Domain-Driven Design](https://amzn.to/3vNV4Hm)
* [Implementing Domain-Driven Design](https://amzn.to/3TJN2HH) * [Implementing Domain-Driven Design](https://amzn.to/3TJN2HH)
* [Microsoft .NET: Architecting Applications for the Enterprise](https://amzn.to/4aktRes) * [Microsoft .NET: Architecting Applications for the Enterprise](https://amzn.to/4aktRes)
* [Greg Young - CQRS, Task Based UIs, Event Sourcing agh!](http://codebetter.com/gregyoung/2010/02/16/cqrs-task-based-uis-event-sourcing-agh/) * [Patterns, Principles, and Practices of Domain-Driven Design](https://amzn.to/3vNV4Hm)
* [Martin Fowler - CQRS](https://martinfowler.com/bliki/CQRS.html) * [CQRS, Task Based UIs, Event Sourcing agh! (Greg Young)](http://codebetter.com/gregyoung/2010/02/16/cqrs-task-based-uis-event-sourcing-agh/)
* [Oliver Wolf - CQRS for Great Good](https://www.youtube.com/watch?v=Ge53swja9Dw) * [CQRS (Martin Fowler)](https://martinfowler.com/bliki/CQRS.html)
* [Command and Query Responsibility Segregation (CQRS) pattern](https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs) * [CQRS for Great Good (Oliver Wolf)](https://www.youtube.com/watch?v=Ge53swja9Dw)
* [CQRS pattern (Microsoft)](https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs)