Slides 6 + 7 - Architecture Metrics Flashcards

1
Q

R. Martin‘s Package Metrics

A

● Ca Afferent Coupling

● Ce Efferent Coupling

● I Instability

● Na Number of Abstract Classes

● Nc Number of Classes

● A Abstractness

● D Distance from Main Sequence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Efferent Coupling (Ce)

A

Number of classes in a given package, which depends on the classes in other packages
● aka Outgoing Dependencies
(auch bekannt als ausgehende Abhängigkeiten)
● Measures the vulnerability of the package to changes in packages on which it depends
(Misst die Anfälligkeit des Pakets gegenüber Änderungen in Paketen, von denen es abhängt)

Interpretation
Ce > 20 indicates instability of a package
● Changes in an external class can cause changes to the package
● Is instable since it depends on the stability of all the classes to which it is coupled
(Ist instabil, da es von der Stabilität aller Klassen abhängt, zu denen es gehört gekoppelt)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Afferent Coupling (Ca)

A

Number of classes in other packages, which depends on the classes in a given package
● aka Incoming Dependencies
(eingehende Abhängigkeiten)
● indicates the package’s level of responsibility
(gibt die Verantwortungsebene des Pakets an)

Interpretation
High values suggest high responsibility and stability
● Package is reused often
● By design, they are typically the most stable units because packages with a high level of responsibility to other packages are difficult to change without impacting its dependents.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Stability and Instability

A

● Measured by calculating the effort to change a package without impacting other packages within the application
● The number of incoming and outgoing dependencies is one indicator determining the stability and instability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Instability

A

Two types of packages
● The ones having many outgoing dependencies and not many of incoming ones (value is close to 1)
-> are rather instable due to the possibility of easy changes

● The ones having many incoming dependencies and not many of outgoing ones (value is close to 0)
-> are rather stable (more difficult in modifying due to their greater responsibility)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Metric Suite by Chidamber & Kemerer

A

Six metrics to describe the quality of object-oriented programs:

  1. WMC Weighted Methods per Class
  2. DIT Depth in Inheritance Tree
  3. NOC Number Of Children
  4. CBO Coupling Between Object classes
  5. RFC Response For a Class
  6. LCOM Lack of Cohesion in Methods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly