From Front to Back: Homomorphic Event Sourcing – Nicole Rauch & Arnaud Bailly – DDD Europe 2018

video:

Domain-Driven Design Europe 2018
https://dddeurope.com/

From Front to Back: Homomorphic Event Sourcing

Event Sourcing is a way to structure a business domain model, where influences from the outside world are regarded as Commands (e.g. “Buy a ticket for a concert”) that internally trigger Events which are the system’s response to the corresponding Commands (e.g. “Concert ticket was bought by …”). At each point in time, the state of the system can be fully reconstructed by looking just at the Events. This approach, coupled with CQRS and other Domain-Driven Design techniques, has a number of advantages: It yields a clean separation of state, interactions and storage; it establishes a direct way to express business domain concepts in terms of interactions; it is composable…

On the other hand, events have always been at the core of User Interfaces, which typically consist of an event loop that pumps events from the underlying system and injects back requests to redraw parts of the GUI. Modern UI frameworks like React/Redux or Elm are actually built on this abstraction: In Elm, Commands trigger an effect on the system, and the resulting Events update the state.

This session proposes to fully embrace Event Sourcing in both front-end and back-end. It shows how to bridge the gap between both worlds by applying morphisms between the language of the front-end and the language of the back-end. We will demonstrate this integration on a small game built with a React UI and a Haskell backend, and in the process show how this approach fits nicely with Functional Programming languages.

BIOGRAPHY

Nicole Rauch is an independent software developer and development coach with a solid background in compiler construction and formal methods. Her focus is on Specification by Example and Domain-Driven Design as well as the restructuring of large Java legacy code applications. Nonetheless, her secret love is for functional programming. Also, she took part in conducting a number of self-organized conferences related to software craftsmanship and agile coaching, e.g. SoCraTes conference. She is one of the initiators of Softwerkskammer, the german-speaking Software Craftsmanship community.

Arnaud has been developing software professionally since 1994. Passionate about all aspects of coding, he has worked as: Researcher/PhD Student on test generation, IT Provider, Freelance consultant on software quality, trainer on various software engineering topics, agile coach, software architect, lead developer, CTO in startups…

Tags

Follow us

Read our latest news from Virtual DDD on any of these social networks!

Recent videos

Systems Thinking Intro with Lorraine Steyn

Systems thinking is the macro behaviour that we must understand in analyzing our world. A system always produces what it is designed to do, even if that isn't at all what we meant it to do! Systems are self-maintaining, and contain balancing and/or reinforcing...