7 Years of Domain-Driven Design (DDD Foundations)

B90ab53ba7cf16ed1a4bb679cc6751d7?s=47 Vladik Khononov
February 05, 2020
270

7 Years of Domain-Driven Design (DDD Foundations)

B90ab53ba7cf16ed1a4bb679cc6751d7?s=128

Vladik Khononov

February 05, 2020
Tweet

Transcript

  1. vladikk doit-intl.com #DDDEU 7 YEARS OF DDD or Tackling Complexity

    in Large Scale Marketing Systems
  2. vladikk doit-intl.com #DDDEU YAY!!!

  3. vladikk doit-intl.com #DDDEU

  4. vladikk doit-intl.com #DDDEU Your Product Marketing Strategy Creatives Campaigns Sales

    Agents Optimization Profits
  5. vladikk doit-intl.com #DDDEU THE FIRST BOUNDED CONTEXT 01

  6. vladikk doit-intl.com #DDDEU

  7. vladikk doit-intl.com #DDDEU

  8. Very nice!!!1

  9. vladikk doit-intl.com #DDDEU Aggregates everywhere!!!

  10. vladikk doit-intl.com #DDDEU Aggregates everywhere!!! Creative Agency Advertiser Publisher Website

    Placement Ad Zone Ad Type Target Market Group Zone Type Funnel Contract Budget Unit Campaign
  11. vladikk doit-intl.com #DDDEU The Bounded Context Creative Agency Advertiser Publisher

    Website Placement Ad Zone Ad Type Target Market Group Zone Type Funnel Contract Budget Unit Audience
  12. vladikk doit-intl.com #DDDEU Domain Model Service / Application Layer Presentation

    Infrastructure Anemic! Behaviour
  13. vladikk doit-intl.com #DDDEU Imperfect architecture “QA is for cowards” BUT

    IT WORKED!
  14. vladikk doit-intl.com #DDDEU UBIQUITOUS LANGUAGE

  15. vladikk doit-intl.com #DDDEU Domain Experts Software Developers No experience in

    online marketing Nice people!
  16. vladikk doit-intl.com #DDDEU Smooth communication Strong grasp of the business

    domain Working software Aggressive time to market
  17. vladikk doit-intl.com #DDDEU Ubiquitous Language Anemic Domain Model

  18. vladikk doit-intl.com #DDDEU Leads Sales Agents Ads

  19. vladikk doit-intl.com #DDDEU Leads CRM Categorize Desk Desk Desk Sales

    Agents Sales Agents Sales Agents Clients’ Systems
  20. vladikk doit-intl.com #DDDEU

  21. vladikk doit-intl.com #DDDEU THE CRM BOUNDED CONTEXT 02

  22. vladikk doit-intl.com #DDDEU Ubiquitous Language Anemic Domain Model

  23. vladikk doit-intl.com #DDDEU Creative Agency Publisher Website Advertiser Ad Zone

    Ad Type Target Market Group Zone Type Funnel Contract Budget Unit Audience Group Desk Qualification Assessment Organization Unit Assignment Rank Message On-site Activity Placement Visit Brand Marketing Lead CRM Lead Marketing Campaign CRM Campaign
  24. vladikk doit-intl.com #DDDEU Domain Experts Software Developers …. Lead ….

    …. Campaign…
  25. vladikk doit-intl.com #DDDEU

  26. vladikk doit-intl.com #DDDEU

  27. vladikk doit-intl.com #DDDEU BOUNDED CONTEXTS PROTECT THE LANGUAGE AGGREGATES PROTECT

    CONSISTENCY OF DATA
  28. vladikk doit-intl.com #DDDEU Creative Agency Publisher Website Advertiser Ad Zone

    Ad Type Target Market Group Zone Type Funnel Contract Budget Unit Audience Group Desk Qualification Assessment Organization Unit Assignment Rank Message On-site Activity Placement Visit Brand Marketing Lead CRM Lead Marketing Campaign CRM Campaign
  29. vladikk doit-intl.com #DDDEU Creative Agency Publisher Website Advertiser Ad Zone

    Ad Type Target Market Group Zone Type Funnel Contract Budget Unit Audience Placement Visit Lead Campaign Marketing Group Desk Qualification Assessment Organization Unit Assignment Rank Message On-site Activity Brand Lead Campaign CRM
  30. vladikk doit-intl.com #DDDEU Aggregates will: • Protect transactional boundaries
 •

    Encompass business logic and invariants Domain Service / Application Layer Presentation Infrastructure
  31. vladikk doit-intl.com #DDDEU Aggregates will: • Protect transactional boundaries
 •

    Encompass business logic and invariants Domain Service / Application Layer Presentation Infrastructure Domain Service / Application Layer
  32. vladikk doit-intl.com #DDDEU

  33. vladikk doit-intl.com #DDDEU

  34. vladikk doit-intl.com #DDDEU

  35. vladikk doit-intl.com #DDDEU Stored procedures???

  36. vladikk doit-intl.com #DDDEU Group Desk Qualification Assessment Organization Unit Assignment

    Rank Message On-site Activity Brand Lead Campaign Lead
  37. vladikk doit-intl.com #DDDEU L e a d CRM Team DBA

    Team
  38. vladikk doit-intl.com #DDDEU

  39. vladikk doit-intl.com #DDDEU Inconsistent models No shared understanding Duplication of

    knowledge Went out of sync quickly NIGHTMARE
  40. vladikk doit-intl.com #DDDEU Wasn’t delivered on time

  41. vladikk doit-intl.com #DDDEU Wasn’t delivered on time Production issues

  42. vladikk doit-intl.com #DDDEU Wasn’t delivered on time Production issues Data

    corruption
  43. vladikk doit-intl.com #DDDEU Wasn’t delivered on time Production issues Data

    corruption Thrown away and reimplemented
  44. vladikk doit-intl.com #DDDEU Ubiquitous Language Domain Model Bounded Contexts Protect

    w/ Implement as
  45. vladikk doit-intl.com #DDDEU Ubiquitous Language Domain Model Bounded Contexts Protect

    w/ Implement as …Dude, where are Sub-Domains?
  46. Not all of a large system will be well designed

    “ Eric Evans
  47. vladikk doit-intl.com #DDDEU THE CRUNCHERS BOUNDED CONTEXT 03

  48. vladikk doit-intl.com #DDDEU Marketing CRM Analysis Customer Events Marketing CRM

  49. vladikk doit-intl.com #DDDEU Marketing CRM Analysis Customer Events Event Crunchers

  50. vladikk doit-intl.com #DDDEU Competitive advantage? - No Off-the-shelve solution? -

    No => Supporting sub-domain
  51. vladikk doit-intl.com #DDDEU Layered Architecture Transaction Script Worked …. for

    a while
  52. vladikk doit-intl.com #DDDEU Customer Events Event Crunchers Marketing CRM Analysis

    Flag Flag Calculated fields
  53. vladikk doit-intl.com #DDDEU Marketing CRM Analysis Customer Events Event Crunchers

  54. vladikk doit-intl.com #DDDEU Customer Events Event Crunchers (BBOM) CRM Marketing

    Analysis
  55. vladikk doit-intl.com #DDDEU Customer Events Event Crunchers (Event Sourced) CRM

    Marketing Analysis
  56. vladikk doit-intl.com #DDDEU THE BONUSES BOUNDED CONTEXT 04

  57. vladikk doit-intl.com #DDDEU Sales Commissions Reports

  58. vladikk doit-intl.com #DDDEU Competitive advantage? - No Off-the-shelve solution? -

    No => Supporting sub-domain
  59. vladikk doit-intl.com #DDDEU Active Record Service / Application Layer Presentation

    Infrastructure
  60. vladikk doit-intl.com #DDDEU Sales Commissions Reports Let’s try different percentages

    What if the percentage could be a function of a price? No, what if the percentage is a function of number of sales? No, no, the percentage will be a function both of number of sales and sale amount And another upgrade if there are more than Y sales per week! But we will upgrade the percentage if there are more than X sales per month!
  61. vladikk doit-intl.com #DDDEU Event Sourced Domain Model Service / Application

    Layer Presentation Infrastructure BIG BALL OF MUD
  62. vladikk doit-intl.com #DDDEU Active Record Service / Application Layer Presentation

    Infrastructure Transaction Script Service / Application Layer Presentation Infrastructure Event Crunchers Bonuses Ubiquitous Language
  63. vladikk doit-intl.com #DDDEU Event Sourced Domain Model Service / Application

    Layer Presentation Infrastructure Event Sourced Domain Model Service / Application Layer Presentation Infrastructure Event Crunchers Bonuses Ubiquitous Language
  64. vladikk doit-intl.com #DDDEU Ubiquitous Language Core Bounded Contexts Protect by


    decomposing to Identify Domains Domain Model Supporting Generic AR / TS Adopt Implement as
  65. vladikk doit-intl.com #DDDEU WHAT WE HAVE L E A R

    N E D
  66. vladikk doit-intl.com #DDDEU UBIQUITOUS LANGUAGE 01

  67. vladikk doit-intl.com #DDDEU UBIQUITOUS LANGUAGE THE CORE DOMAIN OF DOMAIN-DRIVEN

    DESIGN
  68. vladikk doit-intl.com #DDDEU Marketing Ubiquitous Language Business goals achieved CRM

    Ubiquitous Language Production issues Long and painful refactoring Event Crunchers Ubiquitous Language Big ball of mud Bonuses Ubiquitous Language Refactored in time
  69. vladikk doit-intl.com #DDDEU DOMAIN TYPES 02

  70. vladikk doit-intl.com #DDDEU Core Supporting Generic

  71. vladikk doit-intl.com #DDDEU Generic Domain Adopt / Buy Supporting Domain

    Active Record / Transaction Script Core Domain Domain Model / Event Sourcing
  72. vladikk doit-intl.com #DDDEU COMPANIES CHANGE, EVOLVE, REINVENT THEMSELVES DOMAINS' TYPES

    CHANGE ACCORDINGLY
  73. vladikk doit-intl.com #DDDEU SUPPORTING ➤ CORE • Event Crunchers •

    Bonuses
  74. vladikk doit-intl.com #DDDEU Generic Domain Adopt / Buy Supporting Domain

    Active Record / Transaction Script Core Domain Domain Model / Event Sourcing
  75. vladikk doit-intl.com #DDDEU Generic Domain Adopt / Buy Supporting Domain

    Active Record / Transaction Script Core Domain Domain Model / Event Sourcing
  76. vladikk doit-intl.com #DDDEU Less waste Dialog with the business IMPLEMENTATION

    DESIGN ➤ DOMAIN TYPE
  77. vladikk doit-intl.com #DDDEU • Questionable competitive edge? • Unexpected competitive

    edge? BUSINESS COMPLEXITY ≠ DOMAIN TYPE?
  78. vladikk doit-intl.com #DDDEU SUMMARY

  79. vladikk doit-intl.com #DDDEU Creative Agency Advertiser Publisher Website Placement Ad

    Zone Ad Type Target Market Group Zone Type Funnel Contract Budget Unit Campaign Aggregates everywhere!!!
  80. vladikk doit-intl.com #DDDEU Ubiquitous Language Bounded Contexts Protect by
 decomposing

    to Design
 Implementation Core Supporting Generic Domain Model AR / TS Adopt Confirm w/
 Business Ubiquitous Language Everywhere!!!
  81. https://bit.ly/2ptJ5fS THANK YOU! @vladikk vladikk.com https://bit.ly/31nSD9c http://careers.doit-intl.com