adopting
play

ADOPTING DOMAIN DRIVEN DESIGN AT SCALE Combating Near Enemies - PowerPoint PPT Presentation

ADOPTING DOMAIN DRIVEN DESIGN AT SCALE Combating Near Enemies Andrew Harmel-Law Gayathri Thiyagarajan ANDREW HARMEL-LAW Tech Principal at ThoughtWorks GAYATHRI THIYAGARAJAN Engineering Lead at Expedia Group Near


  1. 
 ADOPTING DOMAIN DRIVEN DESIGN AT SCALE Combating Near Enemies Andrew Harmel-Law Gayathri Thiyagarajan

  2. ANDREW HARMEL-LAW Tech Principal 
 at 
 ThoughtWorks

  3. GAYATHRI 
 THIYAGARAJAN Engineering Lead 
 at 
 Expedia Group

  4. “ Near enemies are counterfeits of what we’re actually aiming for, 
 and they're unhelpful because while the genuine article helps free us, the counterfeit doesn’t.” –https://www.wildmind.org/tag/near-enemy

  5. “MODERNISING CRIMINAL JUSTICE” Andrew Andrew Starts Finishes Gayathri Gayathri Starts Finishes

  6. KEY CONSTRAINTS • Modernisation of the end-to-end justice lifecycle (spanning multiple organisations) • Teams already identified and code already being cut • CQRS everywhere

  7. INCREDIBLY HIGH STAKES

  8. PART 1: IN THE BEGINNING…

  9. KEY FINDINGS No single domain No obvious "Big expert had a The cognitive load Picture" detailed, end-to-end was much too high view

  10. Design has been done, Make sure all your design but it hasn't been laid artefacts are created out in a way that makes with the audience in it consumable. mind.

  11. PROBLEM: “A CASE IS A CASE IS A CASE”

  12. SIMILAR (BUT NOT THE SAME) https://www.flickr.com/photos/chiropractic/6849052708

  13. EXAMPLE: DOMAIN GENERIFICATION

  14. Similarities have been Capture the richness of spotted, and abstractions the domain in the core made. entities. But important differences Don’t abstract too early. have been lost in the process.

  15. EXAMPLE: DATA CENTRIC

  16. A data-based view has Sharing models and code been achieved at the between teams is really expense of process / difficult. behaviour, Only share what you Conflicts between teams need to. have resulted.

  17. CORE MODEL PROBLEM SUMMARY • "One Model to Rule them All” • Design-decisions made only part of the domain information • Similarities identified based solely on names • Models were about data. Behaviour was left out

  18. PROBLEM: OWNERSHIP

  19. Hands on modellers Everyone manipulates the aren't hands on. code. They aren't manipulating If certain team members their models and using can't, get them pairing. them to try and solve real-world problems.

  20. WHAT ABOUT THE OTHER SIDE?

  21. Domain Driven Design is Modelling is done by the being done "to" - rather team who own their than "by" - teams. models. Grow DDD practices organically.

  22. LEGAL SYSTEMS ARE NECESSARILY COMPLEX

  23. LEGAL SYSTEMS ARE RIPE FOR DOMAIN DRIVEN DESIGN

  24. PART II: DOING THE DOING

  25. HOW DO THE KEY PIECES FIT TOGETHER?

  26. Not having any10,000- Just because one foot view when working structural "big idea" is wrong, doesn't mean you at scale. can get away with nothing. Relationships between models are always key.

  27. REASONS FOR A SHARED CASE MODEL? • Data consistency • Reporting • Planning • Simplified access control • But what about business-domain needs?

  28. PROBLEM: DATA-NOT-PROCESS

  29. Solving one problem at Don't ignore the tensions between problems. the expense of another. Use DDD tools to make them, and their solutions, explicit.

  30. SOLUTION: AN ABSTRACT CORE?

  31. Anaemic (rather than Don't jump to focused) abstraction. abstraction. Distill it from the detail of specific contexts.

  32. Abstract concepts mean Incrementally step little if they are not towards the final model. understood and And while incrementing, implemented in code by constantly validate and the teams. challenge your model.

  33. SPLITS —> SILOS

  34. Splitting into Bounded Think team relationships Contexts is good. when splitting up bounded contexts 
 But premature splits can so that things don't get lead to silos which are lost between the cracks. harder to recover from.

  35. PROBLEMS: ICEBERGS AND ICE CUBES

  36. Pseudo domain Anything that is not complexity. inherently complex in the domain 
 should not be complex in the code.

  37. SOLUTION: THE END-TO-END VIEW

  38. SEEING THIS IN ACTION

  39. THE EMERGING IMPLEMENTATION

  40. SHORT SIGHT SHORT SIGHT VS VS LONG SIGHT LONG SIGHT

  41. Minimum Viable Product. Don't constrain yourself by requirements and scope (MVP) when learning about the domain. Once learnt, implement MVP .

  42. AS-IS VS TO-BE VICIOUS CYCLE

  43. Legacy (ways of Obtain knowledge from thinking). the current state of the domain. Model the To-Be state.

  44. PART III: PART III: THE 
 THE 
 COMPLICATED COMPLICATED BITS BITS

  45. CQRS - WHAT SUITED US: • Human-centric way to view the Law • Time and eventual consistency as first-class citizens • Event-based thinking at its core • Time + Events = History

  46. CQRS - WHERE THERE WAS FRICTION: • Aggregates - Similar but not the same • Lack of explicit model in code • Read vs Write models • Synchronous way of thinking • Visualisation

  47. CQRS (everywhere). CQRS is powerful when used in the right place. Use it only if suggested by your domain, and even then only sparingly.

  48. CONCLUSIONS • Slow down and listen - • Investigate puzzles - they especially for differences have solutions hidden inside • The domain already knows • Work with the code - a how to split things up lot • Distinguish as-is from to-be • Work as a team - DDD is for everyone • Don't dilute - distill

  49. THANK YOU (WHAT QUESTIONS CAN I ANSWER?)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend