Object-oriented event sourcing

This time, we’re going to refactor our solution towards an object-oriented (OOP) style. The finite state machine we implemented previously enables us to take advantage of polymorphic behaviour while sticking to immutability.

Kuba's blog
Deriving state from events

In event sourcing, the state is derived from events that have happened in the past. In a classic approach, state is persisted while events are lost. In an event-sourced system, it’s the events that are persisted while state is derived.

Kuba's blog
Functional event sourcing example in Kotlin

Let’s implement the Mastermind game with event sourcing. For now, we’re only focusing on the domain model.

Kuba's blog
Functional event sourcing

Let’s consider how functional domain model might work in practice by applying the event sourcing pattern.

Kuba's blog
Functional domain model

A functional domain model is made of pure functions and immutable types. As Domain Driven Design teaches us, it should be expressed in the language shared by everyone involved in the project.

Kuba's blog

Final (at least for now) batch of articles are now migrated from dev.to to my personal domain.

These are from my well received event sourcing series: https://zalas.pl/series/event-sourcing/

#eventsourcing #ddd #dddesign #kotlin

Event Sourcing

Jakub Zalas is a software engineer, architect, and trainer who takes great pride in his craft and quality of work. Friends call him Kuba. Get in touch for consultancy, training or software development.

Kuba's blog

Three weeks ago, I joined an internal AI hackathon.
The rule: one day, build anything work-related — but rely almost entirely on AI.

Obviously, I chose to refactor a core, complex part of the system.
You know me — I like a bit of #DDDesign chaos.

A thread 👇
1/9

I stumbled upon an opinion that in modern #dddesign the Aggregate should be freed from its constraints and the Dynamic Consistency Boundary (DCB) is the next cool thing.

I'm glad to see techies taking seriously the need to innovate with software.

The below post quotes my book "Strategic Monoliths and Microservices—Driving Innovation Using Purposeful Architecture" co-authored with @tjaskula.

#DDDesign is much more than the Magic Aggregate™.

Why pay more for less? My online #DDD workshop goes deeper, lasts longer, and costs less than a typical conference workshop—plus, you’re learning from the guy who wrote the book.

Join me on May 13–16

🎯 Price jumps Apr 21
🎟️ kalele.io/training/iddd
#DDDesign
#DomainDrivenDesign