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.
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.
This hands-on Lab proposes participants to implement 2 event sourced components that are expected to communicate using events and commands, following the principles of Homomorphic Event Sourcing: Events and Commands of the two components are considered as languages that can be mapped one onto the other thus representing the interaction as a composite of the 2 languages.
Participants will be given a specification of this interaction in the form of test cases. They will then have the choice to implement either the front-end (UI) component or the back-end component, using whatever language and framework of their choice but using Event Sourcing as the underlying principle for maintaining the state of the system and HTTP as communication protocol. In the final stage, components will be paired to check the behaviour of the system is indeed the one expected. We shall conclude the session with a discussion over the merits and flaws of the proposed approach.
Participants are expected to bring a laptop which can connect to the local network using Wifi.
Missed #DDDEU?Get tickets for the next edition