In this article, we are going to discuss the working of CQRS and MediatR patterns and step-by-step implementation using .NET Core 6 Web API.
Prerequisites
Tips, Expertise, Articles and Advice from the Pro's for Your Website or Blog to Succeed
In this article, we are going to discuss the working of CQRS and MediatR patterns and step-by-step implementation using .NET Core 6 Web API.
Prerequisites
CQRS is probably amongst one of the most complex and misunderstood things that exists in software architecture today. In fact, it is so complex, that even "super grandmaster software architects" seems to mess it up sometimes. Having successfully applied CQRS into a software projects that succeeds, and putting it on your resume, might sometimes imply an additional digit in salary as a software architect - At least if you can explain how you did it. To understand why, realise CQRS is the stuff that makes Google tick. In Magic, CQRS is a CheckBox.
“What is CQRS?” you might ask. I hope you didn’t think you were going to get a definition because that’s what Wikipedia is for. Instead, what I’m hoping to achieve with this blog post is to help you understand CQRS through some practical examples.
I will assume you’re either a beginner or someone who is unfamiliar with this topic, so maybe you get scared whenever you run into these big programming acronyms and concepts. I myself have been there, so I’m here to help you figure it out in the easiest way possible.
Image source: https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html
Today, architectures such as the onion or hexagonal patterns play an important role in the testability and maintenance of code, its independence from external frameworks, etc. In this tutorial, I will show you how to use clean architecture, with methods and tools such as Domain-Driven Design (DDD), Test (Behavior) Driven Development (TDD), CQRS, Event Sourcing, Containerization, OAuth2, and Oidc to build a microservices architecture.
Hi Spring fans! In this week's installment Josh Long talks to AxonIQ's Steven van Beelen, lead of the Axon project, and Pivotal's Ben Wilcock, on CQRS, event-sourcing, event-storming, microservices, Spring Boot and the long camaraderie shared by Axon and Spring.
Although microservices solve many technical problems, it is time perhaps to conclude, after a few years from the launch date of this concept, that this architecture needs to be further improved, to provide a way to have a clearer vision of the functional components. That's why many architects now use DDD decomposition.
Another concept that has been put in place with DDD is event sourcing and CQRS. In fact, we do not deny the benefits of these implementations but it could also have other technical drawbacks which impact our architecture with more complex debts.