Port of schuchert.wikispaces.com


PPPChapter9Exercise

PPPChapter9Exercise

Up

Part 2: Unit 9

You have been tasked with “reusing” what’s already there. You’ve already pulled out one or more components to support that functionality – catalog maintenance – how does your component measure up?

We just discussed several component coupling principles:

We also just learned about several metrics we can use to evaluate our components:

Instability


title: InstabilityFormula —

[I = \frac{C_E}{(C_E + C_A)}]

Where:

Symbol Description Term Mnemonic
\(C_E\) Efferent Coupling Fan Out E in Efferent: Exiting
\(C_E\) Afferent Coupling Fan In A in Afferent Arriving

Abstractness


title: Abstractness —

[A = \frac{N_a}{N}]

Where

Symbol Description
\(N_a\) Number of abstract classes in component
\(N\) Number of classes in component

Distance from Main Sequence


title: DistanceFromMainSequence — (D = | A + I - 1 |)

Where:

[A = Abstractness] [I = Instability]

Original diagram

What are the values for the original diagram?

Middle Tier

\(C_E = 0\)

\[C_A = 7\] \[I = \frac{0}{0+7} = 0\] \[A = \frac{2}{14} = 0.143\] \[D = |0.143 + 0 - 1| = 0.857\]

UI Tier

\[C_E = 7\] \[C_A = 0\] \[I = \frac{7}{7+0} = 1\] \[A = \frac{1}{5} = 0.2\] \[D = |1 + .2 - 1| = 0.2\]

What to do next?


Final Observations

Up


Comments

" Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.