Previously we looked at events and commands, and this time we'll look at converting events (primarily) to and from JSON. The code can be used for commands too (with really minor modifications), but it's primarily made for dealing with events. First, let's take a look at the code used to represent events again: Here we have 4 different events. In and the data: and the data: The is a literal with the value ). So, how do we get from my JSON representation to an instance of ). So, how do we get from my JSON representation to an instance of...
Previously we looked at events and commands, and this time we'll look at converting events (primarily) to and from JSON. The code can be used for commands too (with really minor modifications), but it's primarily made for dealing with events. First...
In the previous post we talked about some general concepts of CQRS and Event Sourcing. In this one I'd like to get a bit more hands on with the problem. Namely, I'm going to look at what events and commands we need for our user system, and what state we should keep to enable writing our business logic. So, let's start by analysing what a user can do. Or more more to the point, what a user can have done (which is a really weird sentence). Let's talk about events. Events In general, when dealing with database systems, most programmers knows that...
In the previous post we talked about some general concepts of CQRS and Event Sourcing. In this one I'd like to get a bit more hands on with the problem. Namely, I'm going to look at what events and commands we need for our user system, and what state...
A friend of mine and I have recently started working on a project that involves CQRS and Event Sourcing, both of which are new to me. Therefore I figured I'd try to start a blog series explaining the issues I've faced (and will be facing), how I got around them, as well as show how I'm structuring and developing this project. But before I get started with that, I'd like to start by explaining what I mean when I say CQRS and Event Sourcing, as well as some other terms that I will be using later in this series (if I ever get that far). Do note...
A friend of mine and I have recently started working on a project that involves CQRS and Event Sourcing, both of which are new to me. Therefore I figured I'd try to start a blog series explaining the issues I've faced (and will be facing), how I got...