Session

Discovering Aggregate Implementation Patterns and Event-Sourcing via "Code Koans"

There are many ways to implement the Aggregate pattern from Domain-Driven Design:

* OOP style or functional style
* Traditional or event-sourced
* Internal state, external state, on-the-fly state (reconstituted inside the aggregate)
* Reconstitute the full state or just the minimal state needed to make decisions
* Recording changes or returning changes

Many variations are possible, especially with event-sourced aggregates.
I really like the "event-sourced, minimal, on-the-fly state" combination which is a good fit for a prototype phase and is one of the variations in the workshop.

We will discover as many of those variations as possible during the workshop, but we will only implement the event-sourced ones because they are more interesting and allow more variants.

Attendees will implement different versions of the same Aggregate in a "Code Koans" fashion. For each variation, there will be test cases and a skeleton that has to be filled with the missing code to make the tests green.

What you will discover:
* Different styles of implementing an Aggregate
* How you can implement a conceptual Aggregate without having a big "object"
* The basics of event-sourcing
* A light version of ensemble (mob) programming or pair programming
* The idea of "Code Koans"

We supply Git repositories containing Java, Kotlin, C#, and PHP code:
https://github.com/MaibornWolff/aggregate-implementation-patterns-java
https://github.com/MaibornWolff/aggregate-implementation-patterns-kotlin
https://github.com/klimisa/aggregate-implementation-patterns-csharp
https://github.com/jursimplicate/aggregate-implementation-patterns-php

Attendees need a laptop with an IDE that is suitable for one of those languages.
Ideally, they pull the repo before the workshop and install the dependencies, so that they can run the unit tests!

If the workshop is only 2 hours:
* Everybody should be able to implement 3 variants (2 OOP, 3 functional) and the fast ppl. can do No. 4 (functional) as a bonus challenge
* We might have 10-15 minutes to answer questions, which - by experience - are often about persistence, CQRS, EDA, Kafka, ...

If the workshop is 3-4 hours:
* Everybody should be able to implement 4 variants, moving from "typical" OOP to functional and loosely coupled
* We should have at least 15-20 minutes for Q&A

If the conference is remote:
* We will split the audience into teams (ideally not more than 4) to be able to be supported by 2 trainers
* Each group will work as an ensemble (mob) and change the driver role for each variation

If the conference is live and allows good separation of the participants:
* We offer that the participants work as teams, pairs, or solo

If the conference is live but the room is rather small:
* We offer that the participants work in pairs or solo

Remote we prefer to have 20 participants, max. 24.
Live we can do up to 30 but around 26 is preferred.

Remote we need a tool like Zoom to do the workshop.
Live we need a big TV or beamer to present our content.

This workshop is rock solid, we have done it with great success and feedback in different versions:
* KandDDDinsky Oct/Nov 2022 (kandddinsky.de) - live (one room, around 18 participants)
* DDD Europe 06/2022 (dddeurope.com) - live (one room, around 26 participants)
* DDD Summit 11/2021 (ddd-summit.de) - remote (split into 4 teams, around 20+ participants)
* DDD Europe 02/2021 (dddeurope.com) - remote (split into 4 teams, around 20 participants)
* OOP Digital 02/2021 (www.oop-konferenz.de) - remote (split into 4 teams, around 20 participants)
* DDD Summit 11/2020 (ddd-summit.de) - remote (split into 4 teams, around 20+ participants)
* DDD Summit 06/2020 (ddd-summit.de) - remote (split into 4 teams, around 20+ participants)
* Multiple times inside of our company, with smaller groups, remote

Anton Stöckl

Principal Learning Designer for Software Developers @ MaibornWolff

Munich, Germany

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top