Having been a practicing DDD developer for some time, I have always been fascinated with the concept of event sourcing. With that said, I was always intimidated with the implementation details. Most online resources on the topic simplified the concept to the bare bones, which is a great way to learn the strategic side of event sourcing. What is missing in most cases are the tactical details of an an end-to-end event sourced model. This was when I decided to borrow some ideas and build a very simplified model myself. Here is a step by step process of the outcome of my Event Sourcing / DDD / CQRS journey.

Note: This article is not an introduction to Event Sourcing, or lays out reasons for you to use it or not. There are many posts here on Medium and otherwise on this topic. I would also like to mention that much of the code is streamlined from open source code I found online.

Architecture and Assumptions

One of the first things I did in my journey was to recognize that taking a real world scenario was important, but so was simplifying the implementation architecture. While the problem I took was a subset of a real problem, the implementation details were stripped down.

Let’s look at the flow architecture I decided to go with first.

Image for post

#event-sourcing #c-sharp-programming #domain-driven-design #cqrs #c++

Simple Event Souring With C#
2.35 GEEK