Modeling a shipping cost calculator using Template and Strategy design patterns

I wanted to make a simple application of how an event stormed model could be possibly taken into implementation. I took inspiration from a previous industry I worked in because logistics is really one of those good domains where there is lots of options for interesting modeling. The scenario I selected is an MVP for… Continue reading Modeling a shipping cost calculator using Template and Strategy design patterns

Implementing a Raffle System using event modeling and event sourcing

A few weeks ago, I wanted to try out the process of event modeling for designing and then building a simple application. I had picked a simplified raffle application and ended up drawing out the following features: ✅Create a raffle ⏹️View available tickets ✅Sell ticket ⏹️View entrants ✅Pick Random winner ⏹️View winners I had decided… Continue reading Implementing a Raffle System using event modeling and event sourcing

Bugs with Misleading Messages

Are probably the worst. I was getting the following error message when trying to upload to Azure Blob Storage but only for some of the documents we were syncing. ExceptionType: Azure.RequestFailedException Exception: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:bd3ea564-c01e-006e-5101-bb0104000000 Time:2025-05-02T01:26:31.8311894Z Status: 403… Continue reading Bugs with Misleading Messages

Persisting changes as Events

Now we have implemented the persistence of our domain and read models, we can start to revisit the implementation so that we can switch over to an event-sourced domain model instead. We need a way to store and retrieve new events so I have added a private property and exposed a read-only collection as well… Continue reading Persisting changes as Events

Implementing persistence and setting up integration tests along the way

So far, we've used fake repositories in our tests, now it's time to have an actual implementation of how we want to persist our data. The goal is to be able to add entries when our application is running, and even if the application restarts, it should still have this data. In order to be… Continue reading Implementing persistence and setting up integration tests along the way

Teach Your (Domain) Models How to Fish (And Scale)

"Give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime" I feel like we developers have an opportunity to really take this quote to heart. As developers we like giving computers instructions. We retrieve an object that we want to update,… Continue reading Teach Your (Domain) Models How to Fish (And Scale)

TDD of the Domain Model, building a registration app

In the last post we did a TDD walk through building the application but we didn't really get into the event sourcing side of things, which was the original intent of this series. I only recently read about Event Sourcing through the book Understanding Eventsourcing by Martin Dilger. It goes into a lot of detail,… Continue reading TDD of the Domain Model, building a registration app

Trying out TDD, building a registration app

From the last post, I decided to to rename my Aggregate to Individual to align more with a ubiquitous language, a key component of DDD. 😉 I also updated the read model to contain a list of multiple batch statistics so the api would return a single object and not an array of objects. One… Continue reading Trying out TDD, building a registration app

Set up MockServiceWorker for easier front-end development

This week I got the opportunity to introduce the Mock Service Worker library into the user story I was working on. Building a fronted app that should behave differently depending on the response we get from the API gets challenging if you always have to rely on a live API. I first used this library… Continue reading Set up MockServiceWorker for easier front-end development

Experiments with Event Modeling, building a Registration App

I have been reading "Understanding Eventsourcing" by Martin Dilger and got inspired to update my wishlist app to use event sourcing. I managed to do it in a branch but then I stopped because I also wanted to see how feasible it would be to start a project from scratch. My highschool batch is now… Continue reading Experiments with Event Modeling, building a Registration App