Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SER516 Lecture 21a

SER516 Lecture 21a

Software Agility
Dependency Metrics III
(202104)

Javier Gonzalez-Sanchez

February 26, 2019
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. jgs SER 516 Software Agility Lecture 21: Dependency Principles III

    Dr. Javier Gonzalez-Sanchez [email protected] javiergs.engineering.asu.edu | javiergs.com PERALTA 230U Office Hours: By appointment
  2. jgs 516 00010000 • Instability = Cout (Cin + Cout)

    Stable Abstraction Principle IC = 1.0, A= ? IX= 0.5, A= ? IA = 0.0, A= ?
  3. jgs 516 00010000 Stable Abstraction Principle Abstract concrete Stable Hard

    to Change Only incoming dependencies Unstable Changeable Only outgoing dependencies
  4. jgs 516 00010000 Stable Dependency Principle § Every dependency between

    modules should terminate on a module whose Instability metric is less than or equal to the depending module's Instability metric. § Every dependency between modules should terminate on a module whose Abstractness metric is greater than or equal to the depending module's Abstractness metric.
  5. jgs 516 00010000 SAP + SDP § Distance: how far

    a package is away from the Main Sequence § D = A + I – 1 § Values -1 to 1 § Absolute Distance |D|
  6. jgs 516 00010000 Question public class Foo { Bar b=

    new Bar(new Car()); public Foo (Car c) { c.doIt(b); } public void m (Delta d) { d.action(b); } } public class System { public ... main ( ...) { Foo f = new Foo(); //... } }
  7. jgs 516 00010000 Question public class Foo { Bar b=

    new Bar(new Car()); public Foo (Car c) { c.doIt(b); } public void m (Delta d) { d.action(b); } } public class System { public ... main ( ...) { Foo f = new Foo(); //... } } • Tangled: • ISystem = • IFoo = • IBar • Afoo • Any candidate for “painful” zone:
  8. jgs 516 00010000 Question A:0 Ca:1 Ce:4 I:4/5=0.8 D:-0.2 A:0

    Ca:2 Ce:3 I:3/5=0.6 D:-0.4 A:0 Ca:1 Ce:3 I:3/4=0.75 D:-0.25
  9. jgs 516 00010000 Reference § Agile Software Development: Principles, Patterns,

    and Practices. Robert C. Martin. Prentice Hall. 2006. Chapter 30.
  10. jgs SER 516 Software Agility Javier Gonzalez-Sanchez [email protected] Spring 2021

    Disclaimer. These slides can only be used as study material for the class SER516 at ASU. They cannot be distributed or used for another purpose.