Context Mapping In Action

13,502 views
13,181 views

Published on

My presentation about Context Mapping at the DDD-Exchange London 19th June 2009

Published in: Business
2 Comments
25 Likes
Statistics
Notes
No Downloads
Views
Total views
13,502
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
403
Comments
2
Likes
25
Embeds 0
No embeds

No notes for slide

Context Mapping In Action

  1. 1. Context Mapping in action Stretching the strategic Domain Driven Design toolbox to the edge alberto.brandolini@avanscoperta.it
  2. 2. About me Ten years experience as a consultant, mainly in large software development projects Trainer Blogger Article Writer
  3. 3. Dropped in a new project every time
  4. 4. Foto del garage
  5. 5. Foto del garage Whatever they told you before … reality is a lot different
  6. 6. Foto del garage Whatever they told you before It’s always a mess … reality is a lot different
  7. 7. Whatever they told you before … reality is a lot different
  8. 8. Choosing Mentors
  9. 9. Choosing Mentors
  10. 10. Choosing Mentors “I’m Mr. Wolf. I solve problems.” Harvey Keitel
  11. 11. “Every battle is won before it is ever fought” Sun Tzu
  12. 12. “Every battle is won before it is ever fought” Sun Tzu “Tactic without strategy is noise before defeat” Sun Tzu
  13. 13. Know your enemy Code is not your enemy Projects do not fail because of code Standish group put interaction with the users and requirements at the top of the list. … in a complex scenario, these are often second order effects
  14. 14. A limited resource game Brain cells Time Developers Skills
  15. 15. A limited resource game Brain cells Time Developers Skills
  16. 16. A limited resource game Brain cells Time Developers Skills
  17. 17. A limited resource game Brain cells Time Developers Skills
  18. 18. A limited resource game Brain cells Time Developers Skills
  19. 19. A limited resource game Brain cells Time Developers Skills
  20. 20. A limited resource game Brain cells Time Developers Skills
  21. 21. A limited resource game Brain cells Time Developers Skills
  22. 22. A limited resource game Brain cells Time Developers Skills
  23. 23. A limited resource game Brain cells Time Developers Skills
  24. 24. A limited resource game Brain cells Time Developers Skills
  25. 25. A limited resource game Brain cells Time Developers Skills
  26. 26. A limited resource game Brain cells Time Developers Skills
  27. 27. A limited resource game Brain cells Time Developers Skills
  28. 28. A limited resource game Brain cells Time Developers Skills
  29. 29. A limited resource game Brain cells Time Developers Skills
  30. 30. A limited resource game Brain cells Time Developers Skills
  31. 31. A limited resource game Brain cells Time Developers Skills
  32. 32. A limited resource game Brain cells Time Developers Skills
  33. 33. A limited resource game Brain cells Time Developers Skills
  34. 34. A limited resource game Brain cells Time Developers Skills
  35. 35. Enter Context Mapping
  36. 36. Context The setting in which a word or a statement appears that determines its meaning Context
  37. 37. … put in another way A context is a way to measure to which extent a vision could be effectively shared
  38. 38. Relations Context A Context B
  39. 39. Relations Pe o p l e of t probl e n so e ms l ve h e re ... Context A Context B
  40. 40. Relations Pe o p l e of t probl e n so e ms l ve h e re ... Context A ...o r h e re . . . Context B
  41. 41. Relations Pe o p l e of t probl e n so e ms l ve h e re ... Context A ...o r h ...b u t e re . . . the r a re s e al s ome w h o w- h e re s t o pp Context B in be t we e e rs n!!
  42. 42. Upstream Downstream Context A u d Context B
  43. 43. Whatever they told you before … reality is a lot different
  44. 44. Whatever theya difference if it does make told you before … reality is a lot different you’re going upstream
  45. 45. National Geographic, take it away http://www.munseysbearcamp.com/ Bear_salmon2005.jpg
  46. 46. Patterns Relations between different contexts tend to fall into repeatable patterns A specific pattern dictionary helps to describe the current situation Any pattern has a different benefits/costs ratio.
  47. 47. Anti Corruption Layer Flexibility: 4/5, Maintenance: 3/5 Ski!s: 3/5 Organization: 1/5
  48. 48. Partnership Flexibility: 4/5, Maintenance: 2/5 Ski!s: 4/5 Organization: 5/5
  49. 49. Here’s our context B ig Ba ll map of Mu d Context Context F C ! u Context A AC d pe n L d O Hos t Context u B Context Context E D
  50. 50. It’s a MAP!
  51. 51. File 1 The very messy company
  52. 52. Scenario 1:
  53. 53. Scenario 1: A shared area among projects
  54. 54. Scenario 1: A shared area among projects Good Analysis team but separated from development
  55. 55. Scenario 1: A shared area among projects Good Analysis team but separated from development Low interaction with the user
  56. 56. Scenario 1: A shared area among projects Good Analysis team but separated from development Low interaction with the user Domain Expert
  57. 57. Our game set Money Brain Time Developers Skills
  58. 58. Our game set Money Brain Time Developers Skills
  59. 59. Our game set Money Brain Time Developers Skills
  60. 60. Our game set Money Brain Time Developers Skills
  61. 61. Our game set Money Brain Time Developers Skills
  62. 62. Our game set Money Brain Time Developers Skills
  63. 63. Our game set Money Brain Time Developers Skills
  64. 64. Our game set Money Brain Time Developers Skills
  65. 65. Our game set Money Brain Time Developers Skills
  66. 66. Our game set Money Brain Time Developers Skills
  67. 67. The initial scenario Payments Enrollment
  68. 68. The initial scenario h e ... e t or ik e f s l ag Payments ok s t Lo e c t rf pe Enrollment
  69. 69. Shared Kernel Flexibility: 3/5, Maintenance: 2/5, Ski!s: 3/5, Organization: 4/5
  70. 70. The initial stage Legacy Core u u d d Enrollment Payments
  71. 71. Shall we go for DDD?
  72. 72. Shall we go for DDD? Low starting skills
  73. 73. Shall we go for DDD? Low starting skills Long term project
  74. 74. Shall we go for DDD? Low starting skills Long term project Eager to learn
  75. 75. Shall we go for DDD? Low starting skills Long term project Eager to learn A complex domain that calls for sophisticated modeling
  76. 76. Shall we go for DDD? Low starting skills Long term project Eager to learn A complex domain that calls for sophisticated modeling Some developers-analysts already into DDD
  77. 77. “Every battle is won before it is ever fought” Sun Tzu “Tactic without strategy is noise before defeat” Sun Tzu
  78. 78. “Every battle is won before it is ever fought” Wrong question Sun Tzu “Tactic without strategy is noise before defeat” Sun Tzu
  79. 79. The masterplan Legacy Core u u d d Enrollment Payments
  80. 80. The masterplan Legacy Core u u d A CL d Enrollment Payments
  81. 81. The masterplan Legacy Core u u d A CL d Enrollment Payments
  82. 82. The masterplan Legacy Core u u d A CL d Enrollment Payments
  83. 83. The masterplan Legacy Core u u d A CL d Enrollment Payments
  84. 84. The masterplan Legacy Core u u d A CL d Enrollment Payments
  85. 85. The masterplan Legacy Core u u d A CL d Enrollment Payments
  86. 86. Scenario 1 Update:
  87. 87. Scenario 1 Update: A freshly written legacy core.
  88. 88. Scenario 1 Update: A freshly written legacy core. Distributed development teams
  89. 89. Scenario 1 Update: A freshly written legacy core. Distributed development teams Analysis team separated from development
  90. 90. Scenario 1 Update: A freshly written legacy core. Distributed development teams Analysis team separated from development Some teams closely integrated
  91. 91. Scenario 1 Update: A freshly written legacy core. Distributed development teams Analysis team separated from development Some teams closely integrated Some teams completely disconnected
  92. 92. Scenario 1 Update: A freshly written legacy core. Distributed development teams Analysis team separated from development Some teams closely integrated Some teams completely disconnected No interaction with the user
  93. 93. Scenario 1 Update: A freshly written legacy core. Distributed development teams Analysis team separated from development Some teams closely integrated Some teams completely disconnected No interaction with the user Fake Domain Expert
  94. 94. ...the chaotic phase Legacy Core u u u d d d Payments Enrollment Payments
  95. 95. ...the chaotic phase Legacy Core u u u d d d ACL Payments Enrollment Payments
  96. 96. Big Ball of Mud Flexibility: 1/5, Maintenance: 5/5, Ski!s: 1/5, Organization: 1/5
  97. 97. Exposing the bare truth Integration Legacy Core u u u d d d Payments Enrollment Payments Analysis
  98. 98. Exposing the bare truth Integration Legacy Core u u u d d d ACL Payments Enrollment Payments Analysis
  99. 99. Exposing the bare truth Integration Legacy Core u u u Th i t Ub is o u d iq u d is s AW L a d FU u ACL Payments L ! ag ng Enrollment No e Payments Analysis
  100. 100. Exposing the bare truth Integration Legacy Core u u u d d d Payments Enrollment Payments Analysis
  101. 101. Exposing the bare truth Integration Legacy Core u u u d d d ACL Payments Enrollment Payments Analysis
  102. 102. Exposing the bare truth Integration Legacy Core u u u d d d ACL Payments Enrollment Payments Analysis
  103. 103. Exposing the bare truth Integration Legacy Core u u u d d d ACL Payments Enrollment Payments Analysis
  104. 104. Exposing the bare truth Integration Legacy Core u u u d d d ACL Payments Enrollment Payments Analysis
  105. 105. Exposing the bare truth Integration Legacy Core u u u d d d ACL Payments Enrollment Payments Analysis
  106. 106. Exposing the truth
  107. 107. Exposing the truth Ultimately, Sun Tzu war right: though Entities, Value Objects, Aggregates etc. proved successful within their scope... ...That was ultimately not relevant in the large scale Exposing the truth via Context Mapping was relevant and led to major changes in management
  108. 108. File 2 The Strangelove Scenario M.A.D.
  109. 109. Scenario 2: Large government project Many different actors involved Great development team Domain was not the primary focus of the project
  110. 110. Our game set Money Brain Time Developers Skills
  111. 111. Our game set Money Brain Time Developers Skills
  112. 112. Our game set Money Brain Time Developers Skills
  113. 113. Our game set Money Brain Time Developers Skills
  114. 114. Our game set Money Brain Time Developers Skills
  115. 115. Our game set Money Brain Time Developers Skills
  116. 116. Our game set Money Brain Time Developers Skills
  117. 117. Our game set Money Brain Time Developers Skills
  118. 118. Our game set Money Brain Time Developers Skills
  119. 119. Not the perfect stage for DDD Complex domain but outside our project scope Focus on technology: Reliability Security Performance
  120. 120. Our Stage Agency A u X-Team (us) u Agency B u Agency C
  121. 121. Our Plan pp l ie r Agency A u e r/s us t om c X-Team pe n Op e n (us) O H os t Hos t Agency B Publ i s L angu he d ag e Agency C
  122. 122. Our Stage Agency A X-Team (us) Agency B “the others” Agency C
  123. 123. Our Stage Agency A X-Team (us) It’s a Agency B partnership “the others” Agency C
  124. 124. Photo courtesy of Rajarshi Roychowdhury
  125. 125. Choosing Mentors
  126. 126. Choosing Mentors “???” “Franco” Begbie
  127. 127. Choosing Mentors e d a r d i s c “???” D “Franco” Begbie
  128. 128. Cockfight Flexibility: 0/5, Maintenance: 5/5 Ski!s: 0/5 Organization: 0/5
  129. 129. e d a r d i s c D Cockfight Flexibility: 0/5, Maintenance: 5/5 Ski!s: 0/5 Organization: 0/5
  130. 130. Didn’t need any new pattern Despite my idea of “getting rich selling the Strategic DDD Expansion Set”, we didn’t need any new pattern Team was trapped in a Downstream Position “Official partnership” forced us to be conformist to an unreliable external team
  131. 131. Conformist Flexibility: 1/5, Maintenance: 4/5 Ski!s: 2/5 Organization: 2/5
  132. 132. Step 1 Protect our application from X-Team external influences (us) by introducing an ACL Anti Corruption d Layer (no u Conformist any “the others” more)
  133. 133. Step 2 focus all energies to go upstream
  134. 134. Step 2 focus all energies to go upstream Step 2: go upstream
  135. 135. Going upstream
  136. 136. Going upstream published and reliable planning
  137. 137. Going upstream published and reliable planning continuous integration
  138. 138. Going upstream published and reliable planning continuous integration steady pace
  139. 139. Going upstream published and reliable planning continuous integration steady pace effective partnership
  140. 140. Going upstream published and reliable planning continuous integration steady pace effective partnership jacket & tie
  141. 141. Project outcome Reversing the relationship had a positive outcome on all relationships Context Map exposed the right thing to do Delivered on time and on budget Benchmark for following projects
  142. 142. Some years later Overall project now seen as critical: it’s working perfectly (technology)... ...but it’s not doing the right thing. No user-driven evolution Importance of domain model largely underestimated
  143. 143. File 3 ...Not another framework, please
  144. 144. Scenario 3: Government backed (baked) project A “platform” upon which build many “services” Many different players A Family of similar projects in different locations
  145. 145. Payment Services School er Services li pp Certificates Su r- me s to Down (conformist) Cu Down (conformist) Up
  146. 146. Payment Services School er Services li pp Certificates Su r- me s to Down (conformist) Cu Down (conformist) Up Framework
  147. 147. Payment Services School er Services li pp Certificates Su r- me s to Down (conformist) Cu Down (conformist) Up Framework
  148. 148. Payment Services School er Services li pp Certificates Su r- me s to Down (conformist) Cu Down (conformist) Up Up Framework
  149. 149. Payment Services School er Services li pp Certificates Su r- me s to Down (conformist) Cu Down (conformist) Up Up Up Framework
  150. 150. Payment Services m i s t) o r o nf School Do w n (c er Services li pp Certificates Su r- me s to Down (conformist) Cu Down (conformist) Up Up Up Domain Model Framework
  151. 151. Payment Services m i s t) o r o nf School Do w n (c er Services li pp Certificates Su r- me s to Down (conformist) Cu Down (conformist) Up Up Up Domain Model Frameworkk Fram ewor
  152. 152. Payment Services m i s t) o r o nf School Do w n (c er Services li pp Certificates Su r- me s to Down (conformist) Cu Down (conformist) Up Up Up Domain Model Frameworkk Framework Fram ewor
  153. 153. Payment Services m i s t) o r o nf School Do w n (c er Services li pp Certificates Su r- me s to Down (conformist) Cu Down (conformist) Up Up Up Domain Model Frameworkk Framework Fram ewor
  154. 154. Payment Services m i s t) o r o nf School Do w n (c er Services li pp Certificates Su r- me s to Down (conformist) Cu Down (conformist) Up Up Up Domain Model Up Frameworkk Framework Fram ewor
  155. 155. Payment Services m i s t) o r o nf School Do w n (c er Services li pp Certificates Su r- me s to Down (conformist) Cu Down (conformist) Up Up Up Domain Model Up Thi s Frameworkk Framework ewor sh o u defin Fram ldn’t i te l y be lik e t hi s!!
  156. 156. The plan Consolidation of reference framework darwinian selection of features intensive testing wrapping existing features with ACLs releasing constraints on the application side domain --> published language freedom of choice, allowing different paradigms
  157. 157. … no outcome yet, but... Context mapping is driving the strategic decision process Map of the current situation (as far as we know it) Base for a pragmatic action plan Exposes the hot spots
  158. 158. Conclusions
  159. 159. Our context map Big Ba l l of Mu d Context Context F C ! u Context A AC d pe n L d O Hos t Context u B Context Context E D
  160. 160. It’s a MAP!
  161. 161. It’s a MAP This is where battles are win before they’re fought Taking advantage of the landscape concentrating our forces where it does matter avoiding to fight if the odds are against us
  162. 162. Not only for the elite Context mapping has a broader scope of application than tactical DDD far from ideal scenario disconnected environments… … you got the idea… Might tell you whether to go for DDD or not
  163. 163. ...Should be easy to draw...
  164. 164. ...Should be easy to draw... ...but if it’s not, you’re already getting some very useful information Sometimes the process of gathering information to draw the context map is more important than the map itself
  165. 165. Software mirrors organizations
  166. 166. Organizational Dysfunctions
  167. 167. Organizational Dysfunctions Context Mapping often exposes the gap between the ideal communication flow and the real one.
  168. 168. Organizational Dysfunctions Context Mapping often exposes the gap between the ideal communication flow and the real one. ...and this is often in the grey area where nobody is responsible for anything and things simply happen.
  169. 169. Organizational Dysfunctions Context Mapping often exposes the gap between the ideal communication flow and the real one. ...and this is often in the grey area where nobody is responsible for anything and things simply happen. How much does this cost to share a vision?
  170. 170. search - see - expose
  171. 171. search - see - expose Context Mapping gave great insights allowing us to do the right thing.
  172. 172. search - see - expose Context Mapping gave great insights allowing us to do the right thing. Did we discover new things?
  173. 173. search - see - expose Context Mapping gave great insights allowing us to do the right thing. Did we discover new things? Many things were “there” simply floating in the nobody’s land between a context and another.
  174. 174. search - see - expose Context Mapping gave great insights allowing us to do the right thing. Did we discover new things? Many things were “there” simply floating in the nobody’s land between a context and another. Context mapping helped us see the whole picture early and clearly.
  175. 175. Thanks more on http://ziobrando.blogspot.com twitter: ziobrando

×