jgs
SER 516
Software Agility
Lecture 19: Dependency Principles
Dr. Javier Gonzalez-Sanchez
[email protected]
javiergs.engineering.asu.edu | javiergs.com
PERALTA 230U
Office Hours: By appointment
Slide 2
Slide 2 text
jgs
516 00010000
Assignment 05
§ Third Sprint
Sprint Backlog
Burndown Chart
Retrospective
Review
Product – Source Code – Clean Source Code
Product – Class Diagram– Clean Design
Due date Assignment 5.3 – March 30
Slide 3
Slide 3 text
jgs
Previously
Slide 4
Slide 4 text
jgs
516 00010000
Clean?
Slide 5
Slide 5 text
jgs
516 00010000
Class Diagram?
Slide 6
Slide 6 text
jgs
516 00010000
Slide 7
Slide 7 text
jgs
516 00010000
Slide 8
Slide 8 text
jgs
516 00010000
Team 7
Slide 9
Slide 9 text
jgs
516 00010000
Team 7
Slide 10
Slide 10 text
jgs
516 00010000
Team 7
Slide 11
Slide 11 text
jgs
516 00010000
Slide 12
Slide 12 text
jgs
516 00010000
Slide 13
Slide 13 text
jgs
Dependency Metrics
Structural Quality
Slide 14
Slide 14 text
jgs
516 00010000
Question 1
A) B)
Slide 15
Slide 15 text
jgs
516 00010000
Question 2
Problem?
Solution?
Slide 16
Slide 16 text
jgs
516 00010000
Question 3
A)
B)
Slide 17
Slide 17 text
jgs
516 00010000
What could be measured or analyzed?
A bad design smells.
Robert C. Martin describes the following odors (among others):
1. Rigidity – The system is hard to change because every change forces
many other changes.
2. Fragility – Changes cause the system to break in conceptually unrelated
places.
3. Immobility – It’s hard to disentangle the system into reusable
components.
4. Viscosity – Doing things right is harder than doing things wrong.
5. Opacity – It is hard to read and understand. It does not express its intent
well.
jgs
516 00010000
Problem Definition
§ Cycled components can only be used together: they can only be tested,
reused, deployed and understood together.
§ Every node on a cycle depends on any other.
Slide 22
Slide 22 text
jgs
516 00010000
Acyclic Dependencies Principle
§ Avoid dependency cycles
§ Tangle. A subgraph with at least two nodes, where each node is reachable
from each other.
§ Tangled metric. values greater zero indicate cyclic dependencies.
Slide 23
Slide 23 text
jgs
Stable Abstraction Principle
Slide 24
Slide 24 text
jgs
516 00010000
Abstractness of a Package
§ Express the portion of contained abstract types.
§ It is a value 0 to 1:
0 (only concrete classes) to
1 (only interfaces and abstract classes)
Slide 25
Slide 25 text
jgs
516 00010000
Instability of a Package
§ Indicates whether the package is mainly used by other artifacts (stable –
hard to change) or
if it mainly depends on other artifacts (instable – changeable).
§ It is a value 0 to 1:
0 only incoming dependencies to
1 (only outgoing dependencies)
Slide 26
Slide 26 text
jgs
516 00010000
Instability of a Package
§ Indicates whether the package is mainly used by other artifacts (stable –
hard to change) or
if it mainly depends on other artifacts (instable – changeable).
§ It is a value 0 to 1:
0 only incoming dependencies to
1 (only outgoing dependencies)
Slide 27
Slide 27 text
jgs
516 00010000
• Instability = Cout
(Cin + Cout)
Stable Abstraction Principle
IC
= ?, A= ?
IX
= ?, A= ?
IA
= ?, A= ?
Slide 28
Slide 28 text
jgs
To be continued…
Slide 29
Slide 29 text
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.