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

SER516 Lecture 21a

SER516 Lecture 21a

Software Agility
Dependency Metrics III
(202104)

B546a9b97d993392e4b22b74b99b91fe?s=128

Javier Gonzalez
PRO

February 26, 2019
Tweet

Transcript

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

    Dr. Javier Gonzalez-Sanchez javiergs@asu.edu javiergs.engineering.asu.edu | javiergs.com PERALTA 230U Office Hours: By appointment
  2. jgs Previously… Structural Quality

  3. jgs 516 00010000 • Instability = Cout (Cin + Cout)

    Stable Abstraction Principle IC = 1.0, A= ? IX= 0.5, A= ? IA = 0.0, A= ?
  4. jgs 516 00010000 Stable Abstraction Principle More stable a package

    is, the more abstract it should be.
  5. jgs 516 00010000 Stable Abstraction Principle Abstract concrete Stable Hard

    to Change Only incoming dependencies Unstable Changeable Only outgoing dependencies
  6. jgs 516 00010000 Question

  7. jgs 516 00010000 Question A) B)

  8. jgs Stable Dependency Principle

  9. 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.
  10. jgs 516 00010000 Question 3 (again) A) B)

  11. 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|
  12. jgs 516 00010000 Question project3.common.model project3.client.UI project3.server.controller

  13. jgs 516 00010000 Question

  14. 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(); //... } }
  15. 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:
  16. 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
  17. jgs 516 00010000 Example

  18. jgs 516 00010000 Reference § Agile Software Development: Principles, Patterns,

    and Practices. Robert C. Martin. Prentice Hall. 2006. Chapter 30.
  19. jgs SER 516 Software Agility Javier Gonzalez-Sanchez javiergs@asu.edu 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.