Skip to content
Snippets Groups Projects
Jan Kuchař's avatar
Jan Kuchař authored
reconstituteFromHistory can now provide custom mechanism of creating aggregate instances based on given history
f9cc0059
History

Event-Sourcing basic example app

Aim: learn basics of event-sourcing pattern and its caveats.

This project builds on example from presentation from Mathias Verraes - Practical Event Sourcing.

More reading:

Sagas

Notes / TODOs

  • How to make proper relation between Product and Basket?
  • How to access product name when product-related event occurs - aggregate does not expose any state?! (should I access read model from write model?)
  • If aggregate produces event but it does not change state in any way, should it have empty apply() method for this event or should framework just skip this event. (this can lead into hard discoverable typo errors)
  • Is there any point of adding events when loading from history into object "recoded events"?