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
jgs 516 00010000 Stable Abstraction Principle Abstract concrete Stable Hard to Change Only incoming dependencies Unstable Changeable Only outgoing dependencies
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.
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(); //... } }
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:
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.