Expected Exceptions

Code, Software, and things that interest me

Xando pt. 3 - JSON

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. …


Xando pt. 2 - Events, Commands and State

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. …


Xando pt. 1 - Down the rabbit hole of CQRS and Event Sourcing

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 however, that I am in no way an expert on these subjects. This project is the first ever project in which I attempt to do both CQRS and Event Sourcing, so I can’t guarantee that what I write in this post is entirely correct. If you do however find some errors, please do notify me in the comments bellow. Anyways, on to the first topic on the agenda: …