From Big Ball of Mud to Modularity Chris Chedgey Structure101 Jax London October 29, 2013
May 12, 2015
From Big Ball of Mud to Modularity
Chris ChedgeyStructure101
Jax LondonOctober 29, 2013
What you have…
• Thousands of source files
• Countless interdependencies
• Impossible to understand & control
• Works
1. Implementation
What you have…
• Folders, targets, packages, jars, …
• Helps find files
• Helps understand & control?
2. Physical organization
What you have…2. Physical organization
• Folders, targets, packages, jars, …
• Helps find files
• Helps understand & control?
• Folders, targets, packages, jars, …
• Helps find files
• Helps understand & control?
• Hopelessly tangled – NO
2. Physical organizationWhat you have…
1. Unstructured sea of classes
Big Ball of Mud
What you have…
2. Tangled physical organization
What you need…
• Low coupling
• Defines layering visibility
• Communicated
• Maps to code
• Evolves with codebase
3. Modular structure
What you need…
• Low coupling
• Defines layering visibility
• Communicated
• Maps to code
• Evolves with codebase
3. Modular structure
Conform
Align
What you need…Discover and Define
?
3. Modularity
2. Architecture
1. Structure
0. Mud
• Refactor, Align
• Interfaces, definition
• Encapsulation, levelization, cohesion
• Unstructured implementation
Encapsulation
“Mind-sizedchunk”
(Ward Cunningham)
Levelization
DependenciesLevelized
(John Lakos,Kirk Knoernschild)
Levelized
Cumulative Component
Dependency (CCD)
Levelized
“Tangles”
Coupling Composition?
Cohesion
Cohesion
Cohesion
LevelizationEncapsulation
“Structured”
DefinitionInterfaces+
We want…
Cohesion
3. Modularity
2. Architecture
1. Structure
0. Mud
• Refactor, Align
• Interfaces, definition
• Encapsulation, levelization, cohesion
• Unstructured implementation
Interfaces, Definition
Refactoring, Alignment
3. Modularity
2. Architecture
1. Structure
0. Mud
• Refactor, Align
• Interfaces, definition
• Encapsulation, levelization, cohesion
• Unstructured implementation
Thank you!@[email protected]
Cost of the status quo…Miserable developers
Cost per feature increases
Unexpected impacts of change
Unreliable schedules
Test cycles increase
Reuse less
Value of your code base declines