This July Clay’s Software architect Lennart participated a CQRS and Event Sourcing for C# developers training (DDDEU) to learn more about how the various ways CQRS, ES and DDD (Domain Driven Design) can be applied together. The training lasted three days and was hosted in Brussels by the well-known software developer and founder of software company BitTacklr: Yves Reynhout.
Keep reading to find out Lennart’s take on this insightful training he participated in on behalf of Clay.
The Clay development team currently already works enthusiastically with CQRS (Command Query Responsibility Segregation). With the needs for historical information and distributed behavioural systems within our domain, they also want to start applying Event Sourcing in the future. This training has set up the groundwork for this goal. With eleven participants Lennart worked on the assignments provided by Yves in small groups and he applied the explained concepts immediately in a code to get a better grasp of how to apply the concepts.
To implement an event-driven architecture event sourcing can be beneficial for many reasons. The main plus is to be able to reliably publish events whenever state changes. Because it persists events rather than domain objects, it mostly avoids the object relational impedance mismatch problem.
Command and Query Responsibility Segregation (CQRS) is a pattern that segregates the operations that read data (queries) from the operations that update data (commands) by using separate interfaces.
When starting out with Command and query responsibility segregation (CQRS) and Event Sourcing (ES) as a development team it will raise many questions which can be intimidating. In order to avoid such situations, Lennart gained precious information through this course. Afterwards, he gave insights on what he has learned in one of Clay’s tech-talks. Lennart explained to his fellow developers how, why and when CQRS and Event Sourcing could be applied to help Clay move forward in terms of establishing an event-driven architecture. Yves learned them to answer those questions in a practical manner. Using a specific problem domain as a guide, how to come to a working solution using hands-on exercises were explored.
By the end of the three-day training Lennart was capable to employ these patterns in select areas of his code base..
The main bullet points Lennart learned to put into practice during these three days in Brussels:
How to design with and write tests using messages
The various ways CQRS, ES and DDD can be applied together
The mechanics of command and query handling to cater for validation authorization and behavior execution on aggregates
The mechanics of event sourcing
The mechanics of read models and projections
The interaction with an event store
Yves Reynhout is the well-known jack-of-all-trades software developer, who is also a consultant, occasional blogger, speaker and trainer. With over 20 years of experience under his belt, Yves helps companies build software products from inception to production. Yves bridges the gap between product owner, technology, team, problems and solutions. He analyzed, designed, documented, fleshed out models, architected solutions into bite-sized portions, wrote automated test specifications at the unit, integration, story, and UI level, wrote code at every layer and tier in the stack, scripted deployments and engaged in the operational side of running software at customer sites, all in order to satisfy requirements and customer happiness.