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 your aggregate root (AR) boundaries.Continue reading
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.Continue reading
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:
But what is ‘eventual consistency’? ‘Eventual consistency’ is when a read of the data store may return stale results. That is a command has completed but the data store is not yet reflecting the change. This state in a typical line of business application can last for ten’s to the mid hundreds of milliseconds. The actual time is dependant on the specifics of the application. This presents a challenge for designing the user experience. Here are 4 possible approaches to solving this issue.Continue reading
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.Continue reading
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 in answer to exactly this question I found on stackoverflow:
“So my question is how are people handling a screen where by for example it displays a summary of customer details and then a list of their orders with a [more detail] link etc….”Continue reading
Imagine if it was possible, when faced with a potential concurrency issue to programmatically check if any previous ‘events’ actually conflict with the current action being requested. With a CQRS Event Sourced application, it is possible to significantly reduce the problems of concurrency and in the remainder of this article I will show you how.
Sometimes the most effective way for a team to reason about an idea, is to build it. Wireframes are great but a prototype is far more persuasive. Beware however, prototypes have an ugly tendency to morph into the real project or become a blackhole of time. Follow these 10 tips and keep your prototype on track, and most importantly, get the project commissioned.Continue reading
There are often times when you want to include static services in your code. For example, when accessing the file system or including an external analytics package. When you do, it presents a testability problem. Every time you exercise the code via a test, that static service is also called. This post explains a simple pattern I use to solve this issue.Continue reading