RediscoveringModularityChris ChedgeyStructure101@chedgey.NET Edition
“ The most frequentlydeployed of softwarearchitectures:the BIG BALL OF MUD”Brian Foote
Mud • Unstructured implementation
1. StructureMud• Composition, coupling• Unstructured implementation
2. Modularity1. StructureMud• Abstraction, cohesion, interfaces• Composition, coupling• Unstructured implementation
3. Architecture2. Modularity1. StructureMud• Defined, communicated, enforced• Abstraction, cohesion, interfaces• Compositi...
ModularityManage complexitythroughEncapsulation
CompositionModularityManage complexitythroughEncapsulation
Interfaces/info hidingCompositionModularityManage complexitythroughEncapsulation
AbstractionInterfaces/info hidingCompositionModularityManage complexitythroughEncapsulation
AbstractionInterfaces/info hidingCoupling CompositionModularityManage complexitythroughEncapsulation
AbstractionInterfaces/info hidingCohesionCoupling CompositionModularityManage complexitythroughEncapsulation
1. Structure
1. Structure• Composition• compositional complexity
1. Structure• Composition• compositional complexity• Coupling• levelization
1. Structure• Composition• compositional complexity
Composition AbstractionInterfaces/hidingCohesionCouplingClear responsibility
Composition AbstractionInterfaces/hidingCohesionCouplingClear responsibilityModularity
CompositionComplexity
CompositionComplexityCyclomaticComplexity(CC)
Encapsulation AbstractionInterface/hidingCohesionCoupling Clear responsibility
Encapsulation AbstractionInterface/hidingCohesionCoupling Clear responsibilityModularity
CompositionComplexityCyclomaticComplexity(CC)
CompositionComplexityCompositionalComplexity(CC)
Encapsulation AbstractionInterface/hiding?CohesionCoupling?Clear responsibility
Encapsulation AbstractionInterface/hiding?CohesionCoupling?Clear responsibilityModularity?
CompositionComplexityCompositionalComplexity(CC)
CompositionComplexityCompositionalComplexity(CC)+Hierarchical=> Scalable
1. Structure• Coupling• levelization
Coupling
Dependencies
Dependencies
“Tangles”
=
=Not scalable!!
=Not scalable!!
Ideally…Start with a loose “architecture”
Ideally…Start with a loose “architecture”Let suitable architecture emerge, without “baggage”
Ideally…Start with a loose “architecture”Let suitable architecture emerge, without “baggage”At some point stronger, higher...
Ideally…Start with a loose “architecture”Let suitable architecture emerge, without “baggage”At some point stronger, higher...
Ideally…Start with a loose “architecture”Let suitable architecture emerge, without “baggage”At some point stronger, higher...
Ideally…Start with a loose “architecture”Let suitable architecture emerge, without “baggage”At some point stronger, higher...
Ideally…Start with a loose “architecture”Let suitable architecture emerge, without “baggage”At some point stronger, higher...
What actually happens…
0.7.2Mar „04What actually happens…
0.8.6Oct „04
0.8.7Apr „05
Erosion“Sometimes the developers manage to maintain this purity of designthrough the initial development and into the firs...
0.8.8May „05
1.0.0Jun „06
1.3.0Nov „07
1.3.5Sep „08
Cost…
Cost…Miserable developers
Cost…Miserable developersCost per feature increases
Cost…Miserable developersCost per feature increasesUnexpected impacts of change
Cost…Miserable developersCost per feature increasesUnexpected impacts of changeUnreliable schedules
Cost…Miserable developersCost per feature increasesUnexpected impacts of changeUnreliable schedulesTest cycles increase
Cost…Miserable developersCost per feature increasesUnexpected impacts of changeUnreliable schedulesTest cycles increaseReu...
Cost…Miserable developersCost per feature increasesUnexpected impacts of changeUnreliable schedulesTest cycles increaseReu...
2. ModularityCohesion
2. ModularityCohesion
2. ModularityAbstraction (responsibility)
3. ArchitectureDefine, Communicate, Enforce
Technical Debt
Technical Debt
Technical Debt
Technical Debt
Abstraction
Abstraction
Abstraction
Abstraction
Abstraction
Abstraction
Abstraction
Abstraction
Refactoring Restructuring
Refactoring• “Changing code withoutmodifying behavior toimprove nonfunctionalattributes.”Restructuring• “Reorganizing a co...
Refactoring• “Changing code withoutmodifying behavior toimprove nonfunctionalattributes.”• Code is readableRestructuring• ...
Refactoring• “Changing code withoutmodifying behavior toimprove nonfunctionalattributes.”• Code is readable• A lot of inva...
Refactoring• “Changing code withoutmodifying behavior to improvenonfunctional attributes.”• Code is readable• A lot of inv...
Modularization…
Modularization…Decouple implementation levels?
Modularization…Decouple implementation levels?Physical or virtual?
Modularization…Decouple implementation levels?Physical or virtual?Top-down or bottom-up?
Modularization…Decouple implementation levels?Physical or virtual?Top-down or bottom-up?Create structural model (structure...
Modularization…Decouple implementation levels?Physical or virtual?Top-down or bottom-up?Create structural model (structure...
Modularization…Decouple implementation levels?Physical or virtual?Top-down or bottom-up?Create structural model (structure...
Modularization…Decouple implementation levels?Physical or virtual?Top-down or bottom-up?Create structural model (structure...
Visualization
Structure101Visualization
Structure101Visualization
Restructure code-base here …
Restructure code-base here ……to removecomplexityhere …
Restructure code-base here ……to removecomplexityhere ……and createIDE actionshere.
Detect structural debthere…
Define visibilityand layeringrules here…
Communicateand enforce atedit and buildtime…
Communicateand enforce atedit and buildtime…
Thank you!Structure101@chedgey3. Architecture2. Modularity1. StructureMud• Defined, communicated, enforced• Abstraction, c...
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
Nächste SlideShare
Wird geladen in …5
×

Rediscovering Modularity - .NET Edition

1.654 Aufrufe

Veröffentlicht am

Same basic presentation as my JavaOne version, with some graphics replaced by .NET equivalents. I presented this one to Dot Net user groups in Germany and Switzerland.

Veröffentlicht in: Technologie, News & Politik
0 Kommentare
0 Gefällt mir
Statistik
Notizen
  • Als Erste(r) kommentieren

  • Gehören Sie zu den Ersten, denen das gefällt!

Keine Downloads
Aufrufe
Aufrufe insgesamt
1.654
Auf SlideShare
0
Aus Einbettungen
0
Anzahl an Einbettungen
5
Aktionen
Geteilt
0
Downloads
0
Kommentare
0
Gefällt mir
0
Einbettungen 0
Keine Einbettungen

Keine Notizen für die Folie

Rediscovering Modularity - .NET Edition

  1. 1. RediscoveringModularityChris ChedgeyStructure101@chedgey.NET Edition
  2. 2. “ The most frequentlydeployed of softwarearchitectures:the BIG BALL OF MUD”Brian Foote
  3. 3. Mud • Unstructured implementation
  4. 4. 1. StructureMud• Composition, coupling• Unstructured implementation
  5. 5. 2. Modularity1. StructureMud• Abstraction, cohesion, interfaces• Composition, coupling• Unstructured implementation
  6. 6. 3. Architecture2. Modularity1. StructureMud• Defined, communicated, enforced• Abstraction, cohesion, interfaces• Composition, coupling• Unstructured implementation
  7. 7. ModularityManage complexitythroughEncapsulation
  8. 8. CompositionModularityManage complexitythroughEncapsulation
  9. 9. Interfaces/info hidingCompositionModularityManage complexitythroughEncapsulation
  10. 10. AbstractionInterfaces/info hidingCompositionModularityManage complexitythroughEncapsulation
  11. 11. AbstractionInterfaces/info hidingCoupling CompositionModularityManage complexitythroughEncapsulation
  12. 12. AbstractionInterfaces/info hidingCohesionCoupling CompositionModularityManage complexitythroughEncapsulation
  13. 13. 1. Structure
  14. 14. 1. Structure• Composition• compositional complexity
  15. 15. 1. Structure• Composition• compositional complexity• Coupling• levelization
  16. 16. 1. Structure• Composition• compositional complexity
  17. 17. Composition AbstractionInterfaces/hidingCohesionCouplingClear responsibility
  18. 18. Composition AbstractionInterfaces/hidingCohesionCouplingClear responsibilityModularity
  19. 19. CompositionComplexity
  20. 20. CompositionComplexityCyclomaticComplexity(CC)
  21. 21. Encapsulation AbstractionInterface/hidingCohesionCoupling Clear responsibility
  22. 22. Encapsulation AbstractionInterface/hidingCohesionCoupling Clear responsibilityModularity
  23. 23. CompositionComplexityCyclomaticComplexity(CC)
  24. 24. CompositionComplexityCompositionalComplexity(CC)
  25. 25. Encapsulation AbstractionInterface/hiding?CohesionCoupling?Clear responsibility
  26. 26. Encapsulation AbstractionInterface/hiding?CohesionCoupling?Clear responsibilityModularity?
  27. 27. CompositionComplexityCompositionalComplexity(CC)
  28. 28. CompositionComplexityCompositionalComplexity(CC)+Hierarchical=> Scalable
  29. 29. 1. Structure• Coupling• levelization
  30. 30. Coupling
  31. 31. Dependencies
  32. 32. Dependencies
  33. 33. “Tangles”
  34. 34. =
  35. 35. =Not scalable!!
  36. 36. =Not scalable!!
  37. 37. Ideally…Start with a loose “architecture”
  38. 38. Ideally…Start with a loose “architecture”Let suitable architecture emerge, without “baggage”
  39. 39. Ideally…Start with a loose “architecture”Let suitable architecture emerge, without “baggage”At some point stronger, higher-level abstractions are needed
  40. 40. Ideally…Start with a loose “architecture”Let suitable architecture emerge, without “baggage”At some point stronger, higher-level abstractions are needed(~50Kloc – Martin, Foote)
  41. 41. Ideally…Start with a loose “architecture”Let suitable architecture emerge, without “baggage”At some point stronger, higher-level abstractions are needed(~50Kloc – Martin, Foote)Structure, Modularize, Define
  42. 42. Ideally…Start with a loose “architecture”Let suitable architecture emerge, without “baggage”At some point stronger, higher-level abstractions are needed(~50Kloc – Martin, Foote)Structure, Modularize, DefineIterate with development
  43. 43. Ideally…Start with a loose “architecture”Let suitable architecture emerge, without “baggage”At some point stronger, higher-level abstractions are needed(~50Kloc – Martin, Foote)Restructure to defined architectureIterate with developmentStrengthen with growth
  44. 44. What actually happens…
  45. 45. 0.7.2Mar „04What actually happens…
  46. 46. 0.8.6Oct „04
  47. 47. 0.8.7Apr „05
  48. 48. Erosion“Sometimes the developers manage to maintain this purity of designthrough the initial development and into the first release. More oftensomething goes wrong. The software starts to rot like a piece of badmeat.”Bob Martin, “Agile Software Development”
  49. 49. 0.8.8May „05
  50. 50. 1.0.0Jun „06
  51. 51. 1.3.0Nov „07
  52. 52. 1.3.5Sep „08
  53. 53. Cost…
  54. 54. Cost…Miserable developers
  55. 55. Cost…Miserable developersCost per feature increases
  56. 56. Cost…Miserable developersCost per feature increasesUnexpected impacts of change
  57. 57. Cost…Miserable developersCost per feature increasesUnexpected impacts of changeUnreliable schedules
  58. 58. Cost…Miserable developersCost per feature increasesUnexpected impacts of changeUnreliable schedulesTest cycles increase
  59. 59. Cost…Miserable developersCost per feature increasesUnexpected impacts of changeUnreliable schedulesTest cycles increaseReuse less
  60. 60. Cost…Miserable developersCost per feature increasesUnexpected impacts of changeUnreliable schedulesTest cycles increaseReuse lessValue of your code base declines
  61. 61. 2. ModularityCohesion
  62. 62. 2. ModularityCohesion
  63. 63. 2. ModularityAbstraction (responsibility)
  64. 64. 3. ArchitectureDefine, Communicate, Enforce
  65. 65. Technical Debt
  66. 66. Technical Debt
  67. 67. Technical Debt
  68. 68. Technical Debt
  69. 69. Abstraction
  70. 70. Abstraction
  71. 71. Abstraction
  72. 72. Abstraction
  73. 73. Abstraction
  74. 74. Abstraction
  75. 75. Abstraction
  76. 76. Abstraction
  77. 77. Refactoring Restructuring
  78. 78. Refactoring• “Changing code withoutmodifying behavior toimprove nonfunctionalattributes.”Restructuring• “Reorganizing a code-basewithout modifying the code toimprove modularity”
  79. 79. Refactoring• “Changing code withoutmodifying behavior toimprove nonfunctionalattributes.”• Code is readableRestructuring• “Reorganizing a code-basewithout modifying the code toimprove modularity”• Code-base is understandable
  80. 80. Refactoring• “Changing code withoutmodifying behavior toimprove nonfunctionalattributes.”• Code is readable• A lot of invasive code editingRestructuring• “Reorganizing a code-basewithout modifying the code toimprove modularity”• Code-base is understandable• Minimal invasive code editing
  81. 81. Refactoring• “Changing code withoutmodifying behavior to improvenonfunctional attributes.”• Code is readable• A lot of invasive code editing• Scope: small worlds of a fewclasses at a time; what you seein the IDE.Restructuring• “Reorganizing a code-basewithout modifying the code toimprove modularity”• Code-base is understandable• Minimal invasive code editing• Scope: whole code base; whatyou don‟t see in the IDE
  82. 82. Modularization…
  83. 83. Modularization…Decouple implementation levels?
  84. 84. Modularization…Decouple implementation levels?Physical or virtual?
  85. 85. Modularization…Decouple implementation levels?Physical or virtual?Top-down or bottom-up?
  86. 86. Modularization…Decouple implementation levels?Physical or virtual?Top-down or bottom-up?Create structural model (structure, modularize)
  87. 87. Modularization…Decouple implementation levels?Physical or virtual?Top-down or bottom-up?Create structural model (structure, modularize)Define/communicate architecture
  88. 88. Modularization…Decouple implementation levels?Physical or virtual?Top-down or bottom-up?Create structural model (structure, modularize)Define/communicate architectureRepair violations in the implementation levels
  89. 89. Modularization…Decouple implementation levels?Physical or virtual?Top-down or bottom-up?Create structural model (structure, modularize)Define/communicate architectureRepair violations in the implementation levelsAlign physical structure with model
  90. 90. Visualization
  91. 91. Structure101Visualization
  92. 92. Structure101Visualization
  93. 93. Restructure code-base here …
  94. 94. Restructure code-base here ……to removecomplexityhere …
  95. 95. Restructure code-base here ……to removecomplexityhere ……and createIDE actionshere.
  96. 96. Detect structural debthere…
  97. 97. Define visibilityand layeringrules here…
  98. 98. Communicateand enforce atedit and buildtime…
  99. 99. Communicateand enforce atedit and buildtime…
  100. 100. Thank you!Structure101@chedgey3. Architecture2. Modularity1. StructureMud• Defined, communicated, enforced• Abstraction, cohesion, interfaces• Composition, coupling• Unstructured implementation

×