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

Practical Domain-Driven Design - Workshop at ND...

Practical Domain-Driven Design - Workshop at NDC 2025

If you are involved in almost any role related to software product development then you are, by definition, doing modeling. There is always a distinction between the real world and a software product, and the difference is in the model by which the software product chooses to describe the reality.

In this workshop you will practice modeling in order to become better at designing, organizing and building software products.

You will be guided to think from different perspectives and to produce multiple models for the same domain problem. We will cover four different modeling approaches, each bringing more nuance and detail in the understanding of the domain:

Functional decomposition
Role-based decomposition
Time- and role-based decomposition
Decomposition by business capabilities

The real-world problem from the domain of healthcare will be a foundation for the exercise.

Since product development is a cross-functional approach, this exercise will benefit from cross-functional mixture of participants. You are hereby encouraged to join the workshop, regardless of your role in software product development.

Avatar for Mufrid Krilic

Mufrid Krilic

May 23, 2025
Tweet

More Decks by Mufrid Krilic

Other Decks in Programming

Transcript

  1. We all do modeling…. We have no choice! A model

    is an abstraction of reality where we choose to keep the most relevant elements • The challenge is to be as explicit as possible about modeling • “the most relevant elements”
  2. What can you expect to learn in next 2 hours?

    Get encouraged to practice modeling (even more) in your context Do not settle at the first model!
  3. How does a model look like? • Conceptual model used

    for: • Product architecture • Domain model • System decomposition • User Journeys • Modeling language used for: • IT architecture • Code • User interface
  4. 13

  5. Agenda When What 1020 About Modeling  You are Here

    Part 1 Modeling by Functions/Tasks 15 minutes Exercise/Skill Builder Part 2 Modeling by Roles 15 minutes Exercise/Skill Builder Learn from each other – visit other groups 1120-1140 Break What happened in real-life story? Part 3 Modeling by Roles and Time 15 minutes Exercise/Skill Builder Part 4 Modeling by Capabilities 15 minutes Exercise/Skill Builder Learn from each other – visit other groups 1230 What happened in real-life story? Wrap-up
  6. ▪ For patients with identical diagnoses sometimes the treatment has

    the best effect when done in a group of patients ▪ Examples: • Conversation therapy groups in psychiatry • Training sessions post-injury Domain: Healthcare - Group Therapy
  7. Your role today: Product team! • Model a product/system that

    can help your client support group therapy in a better way than with the existing system • Client: • Head of a moderate-size hospital in Norway • 14000 employees • 1 million patient appointments per year
  8. What is the current status at our hospital? • Legacy

    patient record system in production for many years • Group therapy functionality • Many manual routines added to “keep the system afloat”
  9. ▪ Group Therapy: Setting up a group • Planning ▪

    Group Therapy: Conducting group appointments • Check-in process Domain use-cases
  10. Wait a minute! • Didn’t we just model something? •

    Yes! • Proving that modeling can be done in many ways
  11. Different kinds of models • Model of the existing socio-

    technical process for the group therapy As-Is • We want a new model for improved product/system support To-Be This was “As-Is” domain story This is the goal for today!
  12. Functional Decomposition • Boundaries in the system follow the function

    that a user needs to do hers/his job • Classic approach • Boundary = Function
  13. Model a product/system for Group Therapy thus far • Build

    a model based on functions/tasks in the domain story • Example of a function/task: Sending a letter to patient • Be clear about boundaries in the product/system • Model boundaries around functions
  14. Agenda When What 1020 About Modeling Part 1 Modeling by

    Functions/Tasks 15 minutes Exercise/Skill Builder Part 2 Modeling by Roles  You are Here 15 minutes Exercise/Skill Builder Learn from each other – visit other groups 1120-1140 Break What happened in real-life story? Part 3 Modeling by Roles and Time 15 minutes Exercise/Skill Builder Learn from each other – visit other groups Part 4 Modeling by Capabilities 15 minutes Exercise/Skill Builder 1230 What happened in real-life story? Wrap-up
  15. ▪ Group Therapy: Setting up a group • Planning ▪

    Group Therapy: Conducting group appointments • Check-in process Domain use-cases
  16. Role-based decomposition • Boundaries in the system based on which

    roles perform different functions • Leads to more task-oriented model • Boundary = Role based function
  17. Model a product/system for Group Therapy thus far • Build

    a model based on roles in the domain story • Example of a role: human and system actors • Be clear about boundaries in the product/system • Model boundaries around which roles perform different functions
  18. Agenda When What 1020 About Modeling Part 1 Modeling by

    Functions/Tasks 15 minutes Exercise/Skill Builder Part 2 Modeling by Roles 15 minutes Exercise/Skill Builder Learn from each other – visit other groups 1120-1140 Break What happened in real-life story?  You are Here Part 3 Modeling by Roles and Time 15 minutes Exercise/Skill Builder Learn from each other – visit other groups Part 4 Modeling by Capabilities 15 minutes Exercise/Skill Builder 1230 What happened in real-life story? Wrap-up
  19. Model of a “Group” • “Group” is defined as a

    set of properties needed to perform all the functions
  20. Definition of a “Group” model • Physician and specialists •

    Patients • Appointments • Location/Venue • Patient attendance, including no-show • Patients exempted from payment • Invoice – preferred method • Diagnosis-based patient fee • Reference to § in law for compulsory interventions in psychiatry
  21. Role-based model “Group” planning context • Specialists • Patients •

    Appointments • Location • Reference to § in law for psychiatry “Group” check-in context • Patient attendance incl. no-show • Cancelled appointments • Patients exempted from payment • Invoice – preferred method • Diagnosis-based patient fee
  22. Time- and role-based decomposition • Boundaries in the system based

    on which roles perform different function at different times • Supports context-oriented systems • Boundary = Role-based function in a user context
  23. Model a product/system for Group Therapy thus far • Build

    a model based on roles and time in the domain story • Can you model Time explicitly? • Hint: Can activity ordering in domain story help? • Be clear about boundaries in the product/system • Model boundaries around which roles perform different functions at different times
  24. Time- and role-based model “Group” planning context • Specialists •

    Patients • Appointments • Location • Reference to § in law for psychiatry “Group” check-in context • Patients exempted from payment • Invoice preferred method • Diagnosis-based patient fee “Group” billing context • Patient attendance, incl. no-show • Cancelled appointments
  25. Agenda When What 1020 About Modeling Part 1 Modeling by

    Functions/Tasks 15 minutes Exercise/Skill Builder Part 2 Modeling by Roles 15 minutes Exercise/Skill Builder Learn from each other – visit other groups 1120-1140 Break What happened in real-life story? Part 3 Modeling by Roles and Time 15 minutes Exercise/Skill Builder Learn from each other – visit other groups Part 4 Modeling by Capabilities  You are Here 15 minutes Exercise/Skill Builder 1230 What happened in real-life story? Wrap-up
  26. Agenda When What 1050 About Modeling Part 1 Modeling by

    Functions/Tasks 15 minutes Exercise/Skill Builder Part 2 Modeling by Roles 15 minutes Exercise/Skill Builder Learn from each other – visit other groups 1150-1210 Break What happened in real-life story? Part 3 Modeling by Roles and Time 15 minutes Exercise/Skill Builder Part 4 Modeling by Capabilities  You are Here 15 minutes Exercise/Skill Builder Learn from each other – visit other groups 1300 What happened in real-life story? Wrap-up
  27. Departments •Accident and Emergency Department •Anaesthesia and Surgical Services •Cancer

    Treatment and Medical Physics •Children and Youth Clinic •Clinical Nutrition •Communication •Department of Occupational Therapy •Dermatology •Emergency Clinic •Emergency Department Short Stay Unit •Finance •Haukeland hotel •Heart Disease •Human Resources •Internal Medicine •International Collaboration •Laboratory Medicine and Pathology •Maternity Ward •Medical Biochemistry and Pharmacology MBF •Medical Genetics •Neurology •Neurosurgery •Occupational Medicine •Occupational Outpatient Clinic •Ophthalmology •Oral Surgery •Orthopedic Clinic •Physiotherapy •Psychiatry •Radiology department •Recruitment and Temporary Staffing Office •Regional Centre for Asthma, Allergy and Other Hypersensitivity illnesses in Western Norway •Research and Development •Rheumatology •Secretariat for hospital management •Surgical Clinic •The Cancer Center for Education and rehabilitation- CCER •The Norwegian Arthritis Registry - NorArthritis •The Norwegian Porphyria Centre NAPOS •Thoracic Medicine •Treatment abroad •Tuberculosis clinic •Women's Clinic
  28. Decompositions by business capabilities • Boundaries in the system follow

    the capabilities that the business offers its’ customers • Boundary = Business Capability • Boundary ≠ Function • Model around the way the business is organized!
  29. Model a product/system for Group Therapy thus far • Build

    a model based on capabilities in the hospital • Hint: Look out for the differences in the working process • Hint: Look out how the hospital is organized • Be clear about boundaries in the product/system • Model boundaries around the purpose for the hospital
  30. Model by Capabilities “Group” – psychiatry capability • Psychologist •

    Psychiatrist • Diagnosis • Reference to § in law • Patients • Appointments • Location for appointment outside hospital premises “Group” – medical clinical services • Physician • Diagnosis • Patients • Appointments
  31. Core Domain • The thing that distinguishes you from the

    competitors • “Not every part of the system will be well-designed” • Generic subdomain • Supporting subdomain
  32. Product Architecture Which users are we tailoring our products for?

    The cost of customizing the product for diverse user groups The cost of developing separate products for separate user groups
  33. Software Architecture Aligning system boundaries with business intent Re-usable generic

    domain model that can be adapted to serve needs of multiple user groups Specific domain model highly aligned with needs of specific user groups
  34. Thank You! Get in touch for further study and more

    hints! • [email protected] Helping Build Domain-Driven Product Organizations