Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Measuring the Effects of Design Patterns by David Kemp

1,580 views

Published on

  • Be the first to comment

Measuring the Effects of Design Patterns by David Kemp

  1. 1. Code Metrics & Design Patterns Measuring the effects of Design Patterns David Kemp Melbourne Patterns, March 2007
  2. 2. Code Metrics & Design Patterns <ul><li>What are code metrics? </li></ul><ul><li>Example metrics. </li></ul><ul><li>Limitations. </li></ul><ul><li>Examples of measuring before & after refactoring to a pattern. </li></ul><ul><li>Metrics tools. </li></ul><ul><li>References </li></ul>
  3. 3. Code Metrics <ul><li>Measuring software: </li></ul><ul><li>Size </li></ul><ul><li>Complexity </li></ul><ul><li>Coupling and cohesion </li></ul><ul><li>(Not to be confused with project metrics) </li></ul>
  4. 4. Examples <ul><li>Fanout </li></ul><ul><li>% Code duplication </li></ul><ul><li>… </li></ul>
  5. 5. Limitations <ul><li>Not all aspects of design are measurable </li></ul><ul><li>Opinions differ on “good design” </li></ul><ul><li>Unintended effects of measuring </li></ul>
  6. 6. Code Metrics & Design Patterns <ul><li>Examples taken from: </li></ul><ul><li>Brian Huston, </li></ul><ul><li>The effects of design pattern application </li></ul><ul><li>on metric scores. </li></ul><ul><li>The Journal of Systems and Software, 2001. </li></ul>
  7. 7. Mediator
  8. 8. Bridge
  9. 9. Visitor
  10. 10. Stack Before Refactoring
  11. 11. Stack After Refactoring
  12. 12. References & Resources <ul><li>Books & Articles: </li></ul><ul><li>Brian Huston, The effects of design pattern application on metric scores. The Journal of Systems and Software, 2001. </li></ul><ul><li>Michele Lanza, Radu Marinescu, Object-Oriented Metrics in Practice </li></ul><ul><li>Tools: </li></ul><ul><li>Eclipse Metrics (http://www.eclipseplugincentral.com/) </li></ul><ul><li>Complexian (http://www.martyandrews.net/resources/complexian.html) </li></ul><ul><li>Simian (http://www.redhillconsulting.com.au/products/simian/) </li></ul><ul><li>IPlasma (http://loose.upt.ro/iplasma/). </li></ul><ul><li>JHawk (http://www.virtualmachinery.com/jhawkprod.htm) </li></ul><ul><li>Checkstyle (http://checkstyle.sourceforge.net/) </li></ul>

×