SlideShare une entreprise Scribd logo
1  sur  137
Rediscovering
Modularity
Chris Chedgey
Structure101
@chedgey
.NET Edition
“ The most frequently
deployed of software
architectures:
the BIG BALL OF MUD”
Brian Foote
Mud • Unstructured implementation
1. Structure
Mud
• Composition, coupling
• Unstructured implementation
2. Modularity
1. Structure
Mud
• Abstraction, cohesion, interfaces
• Composition, coupling
• Unstructured implementation
3. Architecture
2. Modularity
1. Structure
Mud
• Defined, communicated, enforced
• Abstraction, cohesion, interfaces
• Composition, coupling
• Unstructured implementation
Modularity
Manage complexity
through
Encapsulation
Composition
Modularity
Manage complexity
through
Encapsulation
Interfaces/info hiding
Composition
Modularity
Manage complexity
through
Encapsulation
Abstraction
Interfaces/info hiding
Composition
Modularity
Manage complexity
through
Encapsulation
Abstraction
Interfaces/info hiding
Coupling Composition
Modularity
Manage complexity
through
Encapsulation
Abstraction
Interfaces/info hiding
Cohesion
Coupling Composition
Modularity
Manage complexity
through
Encapsulation
1. Structure
1. Structure
• Composition
• compositional complexity
1. Structure
• Composition
• compositional complexity
• Coupling
• levelization
1. Structure
• Composition
• compositional complexity
Composition Abstraction
Interfaces/hiding
Cohesion
Coupling
Clear responsibility
Composition Abstraction
Interfaces/hiding
Cohesion
Coupling
Clear responsibility
Modularity
Composition
Complexity
Composition
Complexity
Cyclomatic
Complexity
(CC)
Encapsulation Abstraction
Interface/hiding
Cohesion
Coupling Clear responsibility
Encapsulation Abstraction
Interface/hiding
Cohesion
Coupling Clear responsibility
Modularity
Composition
Complexity
Cyclomatic
Complexity
(CC)
Composition
Complexity
Compositional
Complexity
(CC)
Encapsulation Abstraction
Interface/hiding?
Cohesion
Coupling?
Clear responsibility
Encapsulation Abstraction
Interface/hiding?
Cohesion
Coupling?
Clear responsibility
Modularity?
Composition
Complexity
Compositional
Complexity
(CC)
Composition
Complexity
Compositional
Complexity
(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-level abstractions are needed
Ideally…
Start with a loose “architecture”
Let suitable architecture emerge, without “baggage”
At some point stronger, higher-level abstractions are needed
(~50Kloc – Martin, Foote)
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
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
Iterate with development
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 architecture
Iterate with development
Strengthen with growth
What actually happens…
0.7.2
Mar „04
What actually happens…
0.8.6
Oct „04
0.8.7
Apr „05
Erosion
“Sometimes the developers manage to maintain this purity of design
through the initial development and into the first release. More often
something goes wrong. The software starts to rot like a piece of bad
meat.”
Bob Martin, “Agile Software Development”
0.8.8
May „05
1.0.0
Jun „06
1.3.0
Nov „07
1.3.5
Sep „08
Cost…
Cost…
Miserable developers
Cost…
Miserable developers
Cost per feature increases
Cost…
Miserable developers
Cost per feature increases
Unexpected impacts of change
Cost…
Miserable developers
Cost per feature increases
Unexpected impacts of change
Unreliable schedules
Cost…
Miserable developers
Cost per feature increases
Unexpected impacts of change
Unreliable schedules
Test cycles increase
Cost…
Miserable developers
Cost per feature increases
Unexpected impacts of change
Unreliable schedules
Test cycles increase
Reuse less
Cost…
Miserable developers
Cost per feature increases
Unexpected impacts of change
Unreliable schedules
Test cycles increase
Reuse less
Value of your code base declines
2. Modularity
Cohesion
2. Modularity
Cohesion
2. Modularity
Abstraction (responsibility)
3. Architecture
Define, Communicate, Enforce
Technical Debt
Technical Debt
Technical Debt
Technical Debt
Abstraction
Abstraction
Abstraction
Abstraction
Abstraction
Abstraction
Abstraction
Abstraction
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
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, modularize)
Modularization…
Decouple implementation levels?
Physical or virtual?
Top-down or bottom-up?
Create structural model (structure, modularize)
Define/communicate architecture
Modularization…
Decouple implementation levels?
Physical or virtual?
Top-down or bottom-up?
Create structural model (structure, modularize)
Define/communicate architecture
Repair violations in the implementation levels
Modularization…
Decouple implementation levels?
Physical or virtual?
Top-down or bottom-up?
Create structural model (structure, modularize)
Define/communicate architecture
Repair violations in the implementation levels
Align physical structure with model
Visualization
Structure101
Visualization
Structure101
Visualization
Restructure code-base here …
Restructure code-base here …
…to remove
complexity
here …
Restructure code-base here …
…to remove
complexity
here …
…and create
IDE actions
here.
Detect structural debt
here…
Define visibility
and layering
rules here…
Communicate
and enforce at
edit and build
time…
Communicate
and enforce at
edit and build
time…
Thank you!
Structure101
@chedgey
3. Architecture
2. Modularity
1. Structure
Mud
• Defined, communicated, enforced
• Abstraction, cohesion, interfaces
• Composition, coupling
• Unstructured implementation

Contenu connexe

Similaire à Rediscovering Modularity - .NET Edition

Rediscovering Modularity - Java User Groups, Stuttgart, Munich, Nuremberg, No...
Rediscovering Modularity - Java User Groups, Stuttgart, Munich, Nuremberg, No...Rediscovering Modularity - Java User Groups, Stuttgart, Munich, Nuremberg, No...
Rediscovering Modularity - Java User Groups, Stuttgart, Munich, Nuremberg, No...
Chris Chedgey
 
Bridging the Divide between Architecture and Code (Germany JUGs version)
Bridging the Divide between Architecture and Code (Germany JUGs version)Bridging the Divide between Architecture and Code (Germany JUGs version)
Bridging the Divide between Architecture and Code (Germany JUGs version)
Chris Chedgey
 
Clean Code Part III - Craftsmanship at SoCal Code Camp
Clean Code Part III - Craftsmanship at SoCal Code CampClean Code Part III - Craftsmanship at SoCal Code Camp
Clean Code Part III - Craftsmanship at SoCal Code Camp
Theo Jungeblut
 
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard WorkTaming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Joseph Yoder
 

Similaire à Rediscovering Modularity - .NET Edition (20)

Rediscovering modularity - JavaOne Brazil 2012
Rediscovering modularity - JavaOne Brazil 2012Rediscovering modularity - JavaOne Brazil 2012
Rediscovering modularity - JavaOne Brazil 2012
 
Rediscovering Modularity - Java User Groups, Stuttgart, Munich, Nuremberg, No...
Rediscovering Modularity - Java User Groups, Stuttgart, Munich, Nuremberg, No...Rediscovering Modularity - Java User Groups, Stuttgart, Munich, Nuremberg, No...
Rediscovering Modularity - Java User Groups, Stuttgart, Munich, Nuremberg, No...
 
Retrofitting Architecture - Oredev 2012
Retrofitting Architecture - Oredev 2012Retrofitting Architecture - Oredev 2012
Retrofitting Architecture - Oredev 2012
 
Rediscovering Modularity - JFall 2012 version
Rediscovering Modularity - JFall 2012 versionRediscovering Modularity - JFall 2012 version
Rediscovering Modularity - JFall 2012 version
 
Bridging the Divide between Architecture and Code (Germany JUGs version)
Bridging the Divide between Architecture and Code (Germany JUGs version)Bridging the Divide between Architecture and Code (Germany JUGs version)
Bridging the Divide between Architecture and Code (Germany JUGs version)
 
The Developers World
The Developers WorldThe Developers World
The Developers World
 
Software is not a Building - Designing Technical Architecture for Change
Software is not a Building - Designing Technical Architecture for ChangeSoftware is not a Building - Designing Technical Architecture for Change
Software is not a Building - Designing Technical Architecture for Change
 
Acing architecture
Acing architectureAcing architecture
Acing architecture
 
Bridging the divide between architecture and code (US version)
Bridging the divide between architecture and code (US version)Bridging the divide between architecture and code (US version)
Bridging the divide between architecture and code (US version)
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2
 
Clean Code Part III - Craftsmanship at SoCal Code Camp
Clean Code Part III - Craftsmanship at SoCal Code CampClean Code Part III - Craftsmanship at SoCal Code Camp
Clean Code Part III - Craftsmanship at SoCal Code Camp
 
Digital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and MicroservicesDigital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and Microservices
 
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard WorkTaming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
 
Devops - why, what and how?
Devops - why, what and how?Devops - why, what and how?
Devops - why, what and how?
 
Managing modular software for your nu get, c++ and java development
Managing modular software for your nu get, c++ and java developmentManaging modular software for your nu get, c++ and java development
Managing modular software for your nu get, c++ and java development
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
 
Starting from scratch in 2017
Starting from scratch in 2017Starting from scratch in 2017
Starting from scratch in 2017
 
Introduction to the World of Containers
Introduction to the World of ContainersIntroduction to the World of Containers
Introduction to the World of Containers
 
Stackato v5
Stackato v5Stackato v5
Stackato v5
 
Engineering Culture and Infrastructure
Engineering Culture and InfrastructureEngineering Culture and Infrastructure
Engineering Culture and Infrastructure
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Rediscovering Modularity - .NET Edition