SlideShare a Scribd company logo
1 of 51
Download to read offline
Rediscovering
Modularity
JFall 2012
Hart Van Holland, Nijkerk
chris.chedgey@structure101.com
Information hiding
 Defined interface
                                   Clear responsibility

                 Modularity
                        Coupling

Encapsulation                       Abstraction
             Cohesion
Information hiding Clear responsibility
 Defined interface




                         Coupling Abstraction
Encapsulation
              Cohesion        Modularity
Complexity

                Composition

   Cyclomatic
   Complexity
     (CC)
Encapsulate
Information hiding Clear responsibility
 Defined interface




                         Coupling Abstraction
Encapsulation
              Cohesion        Modularity
Complexity

             Composition

 Compositional
  Complexity
    (CC)
Encapsulate
Information hiding?Clear responsibility
 Defined interface?




                         Coupling? Abstraction
Encapsulation
              Cohesion       Modularity?
Complexity

                Composition

Compositional
 Complexity       Hierarchical
   (CC)           => 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                  Restructuring
•   “Changing code without   •   “Reorganizing a code-base
    modifying behavior to        without modifying the code to
    improve nonfunctional        improve modularity”
    attributes.”
Refactoring                  Restructuring
•   “Changing code without   •   “Reorganizing a code-base
    modifying behavior to        without modifying the code to
    improve nonfunctional        improve modularity”
    attributes.”
                             •   Code-base is understandable
•   Code is readable
Refactoring                          Restructuring
•   “Changing code without           •   “Reorganizing a code-base
    modifying behavior to                without modifying the code to
    improve nonfunctional                improve modularity”
    attributes.”
                                     •   Code-base is understandable
•   Code is readable
                                     •   Minimal invasive code editing
•   A lot of invasive code editing
Refactoring                           Restructuring
•   “Changing code without            •   “Reorganizing a code-base
    modifying behavior to improve         without modifying the code to
    nonfunctional attributes.”            improve modularity”
•   Code is readable                  •   Code-base is understandable
•   A lot of invasive code editing    •   Minimal invasive code editing
•   Scope: small worlds of a few      •   Scope: whole code base; what
    classes at a time; what you see       you don’t see in the IDE
    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

More Related Content

Similar to Rediscovering Modularity - JFall 2012 version

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
 
The View - Leveraging Lotuscript for Database Connectivity
The View - Leveraging Lotuscript for Database ConnectivityThe View - Leveraging Lotuscript for Database Connectivity
The View - Leveraging Lotuscript for Database Connectivity
Bill Buchan
 
Clean Code Part II - Dependency Injection at SoCal Code Camp
Clean Code Part II - Dependency Injection at SoCal Code CampClean Code Part II - Dependency Injection at SoCal Code Camp
Clean Code Part II - Dependency Injection at SoCal Code Camp
Theo Jungeblut
 

Similar to Rediscovering Modularity - JFall 2012 version (20)

Cut your Dependencies with Dependency Injection - .NET User Group Osnabrueck
Cut your Dependencies with Dependency Injection - .NET User Group OsnabrueckCut your Dependencies with Dependency Injection - .NET User Group Osnabrueck
Cut your Dependencies with Dependency Injection - .NET User Group Osnabrueck
 
Refactoring to SOLID Code
Refactoring to SOLID CodeRefactoring to SOLID Code
Refactoring to SOLID Code
 
Knowledge Management with K-Infinity
Knowledge Management with K-InfinityKnowledge Management with K-Infinity
Knowledge Management with K-Infinity
 
Design Principles
Design PrinciplesDesign Principles
Design Principles
 
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
 
Cut your Dependencies - Dependency Injection at Silicon Valley Code Camp
Cut your Dependencies - Dependency Injection at Silicon Valley Code CampCut your Dependencies - Dependency Injection at Silicon Valley Code Camp
Cut your Dependencies - Dependency Injection at Silicon Valley Code Camp
 
Building Big Architectures
Building Big ArchitecturesBuilding Big Architectures
Building Big Architectures
 
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
 
The View - Leveraging Lotuscript for Database Connectivity
The View - Leveraging Lotuscript for Database ConnectivityThe View - Leveraging Lotuscript for Database Connectivity
The View - Leveraging Lotuscript for Database Connectivity
 
Austin Docker Meetup May 2015
Austin Docker Meetup May 2015Austin Docker Meetup May 2015
Austin Docker Meetup May 2015
 
Design engineering cohesion by dinesh
Design engineering cohesion by dineshDesign engineering cohesion by dinesh
Design engineering cohesion by dinesh
 
Innovations in Grid Computing with Oracle Coherence
Innovations in Grid Computing with Oracle CoherenceInnovations in Grid Computing with Oracle Coherence
Innovations in Grid Computing with Oracle Coherence
 
Dependency Injection Styles
Dependency Injection StylesDependency Injection Styles
Dependency Injection Styles
 
NoSQL – Beyond the Key-Value Store
NoSQL – Beyond the Key-Value StoreNoSQL – Beyond the Key-Value Store
NoSQL – Beyond the Key-Value Store
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
 
Clean Code Part II - Dependency Injection at SoCal Code Camp
Clean Code Part II - Dependency Injection at SoCal Code CampClean Code Part II - Dependency Injection at SoCal Code Camp
Clean Code Part II - Dependency Injection at SoCal Code Camp
 
Kotlin Online Training.pdf
Kotlin Online Training.pdfKotlin Online Training.pdf
Kotlin Online Training.pdf
 
Kotlin Online Training.pdf
Kotlin Online Training.pdfKotlin Online Training.pdf
Kotlin Online Training.pdf
 
Kotlin Online Training.pdf
Kotlin Online Training.pdfKotlin Online Training.pdf
Kotlin Online Training.pdf
 
Kotlin Online Training.pdf
Kotlin Online Training.pdfKotlin Online Training.pdf
Kotlin Online Training.pdf
 

More from 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
 
Restructuring- improving the modularity of an existing code-base
Restructuring- improving the modularity of an existing code-baseRestructuring- improving the modularity of an existing code-base
Restructuring- improving the modularity of an existing code-base
Chris Chedgey
 

More from Chris Chedgey (6)

Monolith to Modular - The devil in the dependencies
Monolith to Modular - The devil in the dependenciesMonolith to Modular - The devil in the dependencies
Monolith to Modular - The devil in the dependencies
 
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)
 
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)
 
Beautiful Structure
Beautiful StructureBeautiful Structure
Beautiful Structure
 
Rediscovering Modularity
Rediscovering ModularityRediscovering Modularity
Rediscovering Modularity
 
Restructuring- improving the modularity of an existing code-base
Restructuring- improving the modularity of an existing code-baseRestructuring- improving the modularity of an existing code-base
Restructuring- improving the modularity of an existing code-base
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
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
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
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
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 

Rediscovering Modularity - JFall 2012 version

  • 1. Rediscovering Modularity JFall 2012 Hart Van Holland, Nijkerk chris.chedgey@structure101.com
  • 2. Information hiding Defined interface Clear responsibility Modularity Coupling Encapsulation Abstraction Cohesion
  • 3.
  • 4. Information hiding Clear responsibility Defined interface Coupling Abstraction Encapsulation Cohesion Modularity
  • 5. Complexity Composition Cyclomatic Complexity (CC)
  • 6.
  • 7.
  • 9. Information hiding Clear responsibility Defined interface Coupling Abstraction Encapsulation Cohesion Modularity
  • 10.
  • 11. Complexity Composition Compositional Complexity (CC)
  • 12.
  • 13.
  • 15. Information hiding?Clear responsibility Defined interface? Coupling? Abstraction Encapsulation Cohesion Modularity?
  • 16. Complexity Composition Compositional Complexity Hierarchical (CC) => Scalable
  • 17.
  • 19.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30. 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
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. Refactoring Restructuring
  • 42. Refactoring Restructuring • “Changing code without • “Reorganizing a code-base modifying behavior to without modifying the code to improve nonfunctional improve modularity” attributes.”
  • 43. Refactoring Restructuring • “Changing code without • “Reorganizing a code-base modifying behavior to without modifying the code to improve nonfunctional improve modularity” attributes.” • Code-base is understandable • Code is readable
  • 44. Refactoring Restructuring • “Changing code without • “Reorganizing a code-base modifying behavior to without modifying the code to improve nonfunctional improve modularity” attributes.” • Code-base is understandable • Code is readable • Minimal invasive code editing • A lot of invasive code editing
  • 45. Refactoring Restructuring • “Changing code without • “Reorganizing a code-base modifying behavior to improve without modifying the code to nonfunctional attributes.” improve modularity” • Code is readable • Code-base is understandable • A lot of invasive code editing • Minimal invasive code editing • Scope: small worlds of a few • Scope: whole code base; what classes at a time; what you see you don’t see in the IDE in the IDE.
  • 46.
  • 47.
  • 51. 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