View
459
Download
0
Category
Preview:
DESCRIPTION
This is my presentation at JFall 2012, Nijkerk, Netherlands. The presentation is geared for live presentation, but I have serialized some of the animation, so it hopefully makes some sense as a slideshow!
Citation preview
Rediscovering Modularity JFall 2012 Hart Van Holland, Nijkerk chris.chedgey@structure101.com
Encapsulation Abstraction
Defined interface
Information hiding
Cohesion
Coupling
Clear responsibility
Modularity
Encapsulation Abstraction
Defined interface
Information hiding
Cohesion
Coupling
Clear responsibility
Modularity
Composition
Complexity
Cyclomatic
Complexity
(CC)
Encapsulate
Encapsulation Abstraction
Defined interface
Information hiding
Cohesion
Coupling
Clear responsibility
Modularity
Composition
Complexity
Compositional
Complexity
(CC)
Encapsulate
Encapsulation Abstraction
Defined interface?
Information hiding?
Cohesion
Coupling?
Clear responsibility
Modularity?
Composition
Complexity
Compositional
Complexity
(CC)
Hierarchical
=> Scalable
Dependencies
Dependencies
Cost… as code-base grows…
• Cost per feature increases
• Unexpected impacts of change
• Unreliable schedules
• Test cycles increase
• Reuse less
• Value of your code base declines
Technical Debt
Technical Debt
Technical Debt
Technical Debt
Refactoring Restructuring
Refactoring
• “Changing code without
modifying behavior to
improve nonfunctional
attributes.”
Restructuring
• “Reorganizing a code-base
without modifying the code to
improve modularity”
Refactoring
• “Changing code without
modifying behavior to
improve nonfunctional
attributes.”
• Code is readable
Restructuring
• “Reorganizing a code-base
without modifying the code to
improve modularity”
• Code-base is understandable
Refactoring
• “Changing code without
modifying behavior to
improve nonfunctional
attributes.”
• Code is readable
• A lot of invasive code editing
Restructuring
• “Reorganizing a code-base
without modifying the code to
improve modularity”
• Code-base is understandable
• Minimal invasive code editing
Refactoring
• “Changing code without
modifying behavior to improve
nonfunctional attributes.”
• Code is readable
• A lot of invasive code editing
• Scope: small worlds of a few
classes at a time; what you see
in the IDE.
Restructuring
• “Reorganizing a code-base
without modifying the code to
improve modularity”
• Code-base is understandable
• Minimal invasive code editing
• Scope: whole code base; what
you don’t see in the IDE
Restructure101
Structure101
Restructure101
Structure101
Restructure101
Structure101
Summary
Keep CC and tangles out
Stop debt growing (Keep a Lid on It - KALOI)
Restructuring is an option!
Define modular structure
Communicate and enforce
Evolve architecture with iterations
Recommended