SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

Similar a 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
 

Similar a 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
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
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
 

Rediscovering Modularity - .NET Edition