Oh the irony. The DDD community advocates for unambiguous language. And yet even our own terms are heavily overloaded. Whether it’s on stackoverflow like here or on the DDD/CQRS google group like here. So, just to be clear … … a CQRS command is not the same as the Gang Of Four Command Pattern. But what […]
Where do you put code for sending emails? Sounds simple right? The funny thing is that if you’re adding it to a CQRS system it can be a little tricky. Why? It all depends on when you send them. Too early and other processes may fail and you end up sending your email half cocked. […]
Events are at the heart of a CQRS Event Sourced system. Which is why changing or upgrading them can be problematic. In this post I’m going to cover a few principles to bear in mind, which should help you avoid hitting the rocks. Before I dive into ‘how to upgrade CQRS events’ I’m going to […]
Ok, so you have two event sourced aggregate roots. You need to call a method in one from the other. How do you do it? If you find your self asking this question, don’t worry, your not alone. It comes up a lot. The short answer – it suggests there could be something wrong with […]
An aggregate root is at the heart of your domain. I am going to dissect a simple implementation of an Aggregate Root and reveal how it works in a CQRS and Event Sourced system. Before we dive in, we need to fly through some terms often used in DDD.
If you’ve been developing for any length of time you’ve probably had to create an audit log. Here’s the question though, are any of these logs, a 100% provable audit of all changes in the system? I’m guessing not. With event sourcing, a 100% provable event log just happens to be a handy by product. So […]
Ever tried to hold a writhing slippery eel in your hands? In case you haven’t, its hard. Building a UI for a CQRS system needn’t be that tricky but you do need to contend with some interesting challenges: The commands ‘complete’ far faster than you may expect – compared to a consistent application. The read […]
When starting out with CQRS, designing the ‘events’ is not always obvious or easy. The more experienced you are, the more likely your habits will lead you astray. This post will help you spot the problems early and stay on the right track.
One of the most liberating things about the CQRS ES way, is the simplicity of the read side. However, if you are new to CQRS you may have wondered how it works. How for example, would it work for a classic master details view? You are not alone, in fact, I am writing this post […]
A common issue I see is understanding the flow of commands, events and queries within a typical CQRS ES based system. The following post is designed to clear up what happens at each step. Hopefully this will help you to reason about your code and what each part does.