Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Event based modeling - eng

3.663 Aufrufe

Veröffentlicht am

English version of the accompanying slide deck. But from now on I'll call it Event-Storming ;-)

Veröffentlicht in: Technologie
  • Follow the link, new dating source: ♥♥♥ http://bit.ly/39mQKz3 ♥♥♥
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier

Event based modeling - eng

  1. 1. 1giovedì 23 maggio 13
  2. 2. GoalsQuickly sketch a model for a complexsystemHave the basic concepts of Domain-Driven Design emerge withoutprerequirements.2giovedì 23 maggio 13
  3. 3. 3giovedì 23 maggio 13
  4. 4. In practice...Stick a paper roll on a wall.We might have up to 25 metres ofmodeling spaceCollaborative work4giovedì 23 maggio 13
  5. 5. Yes, I mean that muchspace...5giovedì 23 maggio 13
  6. 6. Domain EventsMight resemble an Activity Diagram...but we’re not doing UMLEvents cannot be discussed. They happened. Dealwith it.System-wide view.Every team start to imagine a domain, insteadof asking to the domain expert... :-(Real system might be a lot simplerReal system might be a lot more complex6giovedì 23 maggio 13
  7. 7. Hint:...it gets a lot more interesting if weexplore areas we don’t know.... with the domain expert.... with concrete examples.7giovedì 23 maggio 13
  8. 8. 8giovedì 23 maggio 13
  9. 9. Event OriginEvents do not just appear out of theblue:some originate from user actionssome originate in external systemssome are generated by time...some are originated as a response to otherevents9giovedì 23 maggio 13
  10. 10. 10giovedì 23 maggio 13
  11. 11. FLOW (team decided this way)Team decided to startfrom the right... wecalled it WOLF insteadof FLOW then.11giovedì 23 maggio 13
  12. 12. 12giovedì 23 maggio 13
  13. 13. Event FlowSearch for predecessors orconsequences of our eventsUsing verbs in the past helps clarify thesemantics:“wedding” is not an event, it’s a process (don’ttell it to your wife)More actors are joining our system13giovedì 23 maggio 13
  14. 14. 14giovedì 23 maggio 13
  15. 15. Aggregates“How do I correctly defineaggregates?” ... yes, that’s THEquestionHave a look to DDD mailing lists, if you don’tbelieve itOur goal is to define aggregates outsidein15giovedì 23 maggio 13
  16. 16. DefinitionAn aggregate represents consistencyunit: a group of classes changing statetogether....but it’s not always clear enough......how big these objects are?...how do they look like?It has something to do with transactionalboundaries but ours might be wrong.16giovedì 23 maggio 13
  17. 17. Rule of thumbTo sketch aggregate boundaries we canthink aboutInformations deleted togetherInformations moved togetherInformations distributed together...but that’s still a little too data-centric17giovedì 23 maggio 13
  18. 18. InvariantsForget data:An aggregate can accept or reject acommand.Upon which information?What is always guaranteed for ouraggregate?18giovedì 23 maggio 13
  19. 19. 19giovedì 23 maggio 13
  20. 20. AggregatesShifting the focus on invariants helpsaggregate modelingSmaller, more controllable unitsVariations are propagated via Domain EventsA better domain explorationThe whole is eventually consistent20giovedì 23 maggio 13
  21. 21. ExampleMax particpants per class:Where does this constraint come from?Classroom capacity? --> accept and look for abetter location (if there’s time available)Class physiological limit --> stand-by andwaiting list or propose next editionNo accidental complexity requirements.21giovedì 23 maggio 13
  22. 22. 22giovedì 23 maggio 13
  23. 23. SubdomainsBusiness level system partitioningSome portions are core for our companycompetitivity.Es. things that are going to sell more.Other are simply necessary, but no keydifferentiators.Es. invoicing: it’s needed but no customer willchoose us for the invoice layout. Good enough isgood enough.23giovedì 23 maggio 13
  24. 24. LanguagesIn mid/large-sized companies we’ll havemany stakeholders.Different goalsdifferent backgrounds,different languages...will require different modelsCaution: we aren’t talking about BoundedContexts...yet24giovedì 23 maggio 13
  25. 25. 25giovedì 23 maggio 13
  26. 26. Bounded ContextsHighlight the different models in playSoftware componentsLegacy componentsLanguages usedThey’re a realistic snapshot, not theimage of our wishes...26giovedì 23 maggio 13
  27. 27. 27giovedì 23 maggio 13
  28. 28. Users & PersonasGot a chance to include users and theircategories in the picture? Why not!?We can highlight personas and makethem part of the model......especially if this triggers aninteresting conversation with thedomain experts.28giovedì 23 maggio 13
  29. 29. 29giovedì 23 maggio 13
  30. 30. TestsSome interesting details might emergeduring the conversation. Why not take anote?In natural language...according to BDD lingo (--> Cucumber)In an event driven perspective, thestructure Given [events] When[command] Then [event] fits very well :-)30giovedì 23 maggio 13
  31. 31. 31giovedì 23 maggio 13
  32. 32. TakeawaysModel of a complex enterprise systemignoring data... what if data model is part of the problem?Tight focus on system behavior and noton static data structure.32giovedì 23 maggio 13
  33. 33. TakeawaysThe model is created collectively in acooperative learning fashion andprovides a good high-level view.Are you sure DEs know everything?Time-boxed, but....Space-boxed but....33giovedì 23 maggio 13
  34. 34. Legacy SystemsThe sketched model is close to an “idealsystem model”It’s NOT the starting point to rewrite from scratch!But it’s a good reference to establish a directionLegacy components that do not belong in thedomain emerge like accidental complexity.batch operations, legacy stuff feel reallyinappropriate.34giovedì 23 maggio 13
  35. 35. 35giovedì 23 maggio 13