Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DDD Vienna 2018: Event storming! Putting it all together.

DDD Vienna 2018: Event storming! Putting it all together.

Event Storming Workshop, DDD Vienna Meetup, March 23rd 2018

2999fab21d182294fad0b2cc590fd54d?s=128

Martin Schimak

March 23, 2018
Tweet

Transcript

  1. Event storming! Putting it all together. @martinschimak -> March 23rd,

    2018 -> Domain-Driven Design Vienna
  2. The credit is due to him.

  3. Event storming starts with brainstorming events. Goods shipped Order placed

    Goods fetched Payment received „We need to create a set of facts to create value for customers!“
  4. Events are just that: facts Something happened! Now it‘s in

    the past. And therefore in the past tense! Payment received
  5. Somebody needs to create the facts Nothing „really“ happened so

    far! Apart from that we intend to create new facts! :-) Request payment
  6. Commands are intent Request payment

  7. Now it happened! New facts we can build upon. Payment

    received Request payment
  8. First, start with some of the facts… Goods shipped Order

    placed Goods fetched Payment received Order fulfilled
  9. … then add some commands as appropriate Goods shipped Order

    placed Goods fetched Payment received Place order Request payment Fetch goods Ship goods Order fulfilled
  10. Some commands might be triggered by users… Goods shipped Order

    placed Goods fetched Payment received Place order Request payment Fetch goods Ship goods Order fulfilled
  11. …whereas others happen because of internal policies Goods shipped Order

    placed Goods fetched Payment received Place order Request payment Fetch goods Ship goods Order fulfilled Policy
  12. Policies sit in between events and commands If this then

    that! Order placed Request payment The simplest possible policy is that whenever an event happens, we always follow up with a command
  13. Use policies to indicate the more interesting stuff! Order placed

    Place order Order fulfilled Goods fetched Fetch goods Payment received Request payment Optionally wait for payment Ship goods Goods shipped When shipped and paid Mark order fulfilled
  14. You might want to indicate external systems Order placed Place

    order Order fulfilled Goods fetched Fetch goods Payment received Request payment Optionally wait for payment Ship goods Goods shipped When shipped and paid Mark order fulfilled Inventory system
  15. Pro Tip: don‘t fall in love with your (own) sticky

    notes!
  16. When you don‘t like some stuff schedule it for removal

    Order placed Place order Order fulfilled Goods fetched Fetch goods Payment received Request payment Optionally wait for payment Ship goods Goods shipped When shipped and paid Mark order fulfilled Coffee brewed
  17. Domain Event To sum it up. It starts with some

    events.
  18. Domain Event We add some commands Command Command

  19. Domain Event Optionally we show that a command is triggered

    by a user Command Command
  20. Domain Event Optionally we show a specific policy triggering a

    command Command Command (Optional) Policy
  21. Domain Event (Optional) Policy Command Command Optionally we show a

    command is invoked on external systems (Optional via) External System
  22. Now have fun!

  23. Domain Event (Optional) Policy Command Command Our legend for today.

    We never (ever) use arrows! :-) (Optional via) External System
  24. Read Model Domain Event Aggregate Policy Command External System UI

    Command Invoked on raises raises Invoked on projected onto listened to by triggers triggers Inspired by the picture that explains (almost) everything :-) * *) Idea: the ingenious Alberto Brandolini
  25. Event Storming Master Class?

  26. Brussels APRIL 11-13, 2018 Advanced Domain–Driven Design MATHIAS VERRAES APRIL

    12-13, 2018 EventStorming Master Class ALBERTO BRANDOLINI Paris MAY 24-25, 2018 Essential Domain–Driven Design PAUL RAYNER JUNE 26-29, 2018 DDD Immersion ERIC EVANS
  27. None
  28. None