$30 off During Our Annual Pro Sale. View Details »

Building Better Domain Models With Jeff Patton's User Story Mapping

Building Better Domain Models With Jeff Patton's User Story Mapping

A small workshop by Daniel Sack and Martin Schimak, DDD Vienna, April 5th 2019

Martin Schimak

April 05, 2019
Tweet

More Decks by Martin Schimak

Other Decks in Programming

Transcript

  1. Building Better Domain Models
    with Jeff Patton’s User Story Mapping
    A small workshop by Daniel Sack and Martin Schimak, DDD Vienna, April 5th 2019

    View Slide

  2. User Story Mapping and Domain Modeling
    https://specmap.cc/ https://martinfowler.com/bliki/BoundedContext.html

    View Slide

  3. Get ready
    for work
    Wake up
    Discrete Steps are the smaller things we do.
    They help us to reach the goal of activities.
    Activities are bigger things we do.
    They are comprised of multiple steps.
    Configure
    alarm sound
    Looking at Details we may see different means,
    options and alternatives how to carry out steps.
    The main ingredients of user story mapping …

    View Slide

  4. Wake up
    Get ready
    for work
    Get ready to
    leave the house
    Have a
    breakfast
    Commute to
    the workplace
    Get settled in
    and start work
    Configure
    alarm sound
    Get out of bed
    Brew and
    drink coffee
    Walk to
    station and
    take subway
    Have a
    morning chat
    Hit snooze
    button
    Add some milk
    and sugar
    Choose the
    best train
    Hugo, a world class gardener:
    „Walking
    Skeleton“
    „Backbone“
    (activities)
    Start with
    gardening

    View Slide

  5. Configure
    alarm sound
    Get out of bed
    Brew and
    drink coffee
    Walk to
    station and
    take subway
    Have a
    morning chat
    Hit snooze
    button
    Clean up for
    the day
    Add some milk
    and sugar
    Choose the
    best train
    Start with
    gardening
    Mapped
    Backlog
    User journey
    Priority
    Read map from left to right, from top to bottom
    Pull 1 Pull 2 Pull 2
    Pull 3 Pull 3
    Project
    good enough!
    ✓ ✓ ✓ ✓ ✓

    ✓ ✓ ✓

    View Slide

  6. Work with what fits best for your team and don’t be afraid to change!
    © https://mozaicworks.com/blog/3-uses-story-maps-build-better-product/

    View Slide

  7. Is this „just“ plain old „agile“ methodology?

    View Slide

  8. What about DDD?

    View Slide

  9. © Paul Rayner‘s
    „Essential DDD“ workshop
    in Denver 2018
    `s three pillars

    View Slide

  10. DDD - developing great business software - is a lot about … collaborative modeling

    View Slide

  11. Ubiquituos language …
    … encompasses all three pillars of DDD!

    View Slide

  12. These are BEDs in the context of gardening work

    View Slide

  13. These are (track) BEDs in the context of subway transport

    View Slide

  14. This is a BED (and a snoring gardener) in a domestic context

    View Slide

  15. It is NOT universal ... and NOT even „enterprise-wide“! :-)
    Ubiquitous Language?

    View Slide

  16. But if not universal … what does
    ubiquitous actually mean?

    View Slide

  17. Configure
    alarm sound
    Get out of bed
    Brew and
    drink coffee
    Walk to
    station and
    take subway
    Have a
    morning chat
    Hit snooze
    button
    Clean up for
    the day
    Add some milk
    and sugar
    Choose the
    best line
    Start with
    gardening
    It‘s ubiquitous for a DDD team. Language matters.
    Wake up
    Get ready to
    leave the house
    Commute to
    the office
    Get settled in
    and start work
    Have a
    breakfast

    View Slide

  18. Language needs context

    View Slide

  19. Configure
    alarm sound
    Get out of bed
    Brew and
    drink coffee
    Walk to
    station and
    take subway
    Have a
    morning chat
    Hit snooze
    button
    Clean up for
    the day
    Add some milk
    and sugar
    Choose the
    best line
    Start with
    work
    User story maps provide a good dose of context …
    Wake up
    Get ready to
    leave the house
    Commute to
    the work place
    Get settled in
    and start work
    Have a
    breakfast
    We know
    what this is!

    View Slide

  20. Activites and Steps help us remember and re-
    tell the story, they focus on giving us context.
    Configure
    alarm sound
    The Detail Stories help us to imagine the product
    we build, and describe the software we could build.
    … and are telling us a bigger story (user journey)
    Get ready
    for work
    Wake up

    View Slide

  21. Configure
    alarm sound
    Get out of bed
    Brew and
    drink coffee
    Walk to
    station and
    take subway
    Have a
    morning chat
    Hit snooze
    button
    Clean up for
    the day
    Add some milk
    and sugar
    Choose the
    best line
    Start with
    work
    The more context we know, the better we see boundaries
    Wake up
    Get ready to
    leave the house
    Commute to
    the work place
    Get settled in
    and start work
    Have a
    breakfast

    View Slide

  22. Language needs Context
    Models need Boundaries

    View Slide

  23. © Paul Rayner‘s
    „Essential DDD“ workshop
    in Denver 2018
    `s three pillars

    View Slide

  24. Useful models need a purpose. And precise language!

    View Slide

  25. Gardening Work
    Product
    Price
    Supplier
    Subway Transport
    Line
    Track
    Station
    Alarm Snooze
    Wake up
    Domestic/Household
    The idea of explicitely defining bounded contexts.
    Ubiquitous
    Language
    Ubiquitous
    Language
    Ubiquitous
    Language
    Bounded
    Context
    Bounded
    Context
    Bounded
    Context

    View Slide

  26. Story maps let us see through to bounded contexts
    Interpretation

    View Slide

  27. © Paul Rayner‘s
    „Essential DDD“ workshop
    in Denver 2018
    `s three pillars

    View Slide

  28. Account
    Management
    Identifying a core domain … depends on priorities
    Credit Transfer
    Customer Relationship
    Gardening
    work
    Domestic/Household
    Supporting Domain
    Core Domain
    Generic Domain
    Subway Transport

    View Slide

  29. Configure
    alarm sound
    Get out of bed
    Brew and
    drink coffee
    Walk to
    station and
    take subway
    Have a
    morning chat
    Hit snooze
    button
    Clean up for
    the day
    Add some milk
    and sugar
    Choose the
    best train
    Start with
    gardening
    Mapped
    Backlog
    User journey
    Priority
    There is at least a soft relationship to story maps …
    Pull 1 Pull 2 Pull 2
    Pull 3 Pull 3
    Project
    good enough!

    View Slide

  30. Understanding bounded contexts will help planning
    Get ready
    for work
    Wake up
    Configure
    alarm sound
    Huge epic spanning several contexts
    Large feature spanning several stories
    Small story ready for implementation

    View Slide

  31. Story maps and context maps must „live“ (or die)
    Interpretation
    Learning

    View Slide

  32. Strategic Design is key:
    Models and Teams
    need explicit boundaries

    View Slide

  33. View Slide

  34. View Slide

  35. View Slide

  36. View Slide

  37. Hands-on!

    View Slide

  38. Coffee lover Hugo starts his small Coffee Roasting Biz! *)
    *) Inspired by Nick Chamberlain‘s book
    „Applying Domain-Driven Design with
    CQRS and Eventsourcing“ Thank you, Nick!

    View Slide

  39. Hugo says: “We roast-to-order your very own coffee!“
    Do you, Hugo? Well, almost. What actually happens …
    1) Hugo buys diverse green beans and stocks them
    2) Hugo schedules roasting days - to roast the beans in batches
    3) Customers buy coffee on website – coffee roasted in a very specific batch!

    View Slide

  40. Now it‘s our turn to build a story map – PHASE 1
    1) You get an unsorted
    starter set of stickies!
    2) Try to make sense
    of the pink skeleton!
    3) Add yellow stickies
    and prioritize them,
    rewrite, add, dismiss!

    View Slide

  41. Now it‘s our turn to build a story map – PHASE 2
    1) Step back and watch out for
    semantical boundaries
    2) Use sticky notes to name some
    bounded context candidates
    3) Discuss some deliverables: how are
    they related to contexts? Use
    colored dots to show a relation!
    Domestic,
    Household

    View Slide