OO Design Quality Indicators

I am reading a scientific article on OO design quality indicators written by Robert Martin.

In his article, he describes "a set of indicators that can be used to measure the quality of an object-oriented design in terms of the interdependence between the subsystems of this project"

He talks about how there should be a good balance between abstraction and instability. Here are the metrics that he writes and how they can be calculated:

Na: The number of concrete and abstract classes (and interfaces) in a package is an indicator of the extensibility of the package.

Afferent Couplings (Ca) : the number of classes outside the package that depend on the classes within the package.

Efferent Couplings (Ce) : The number of classes within a package that depend on classes outside the package.

Abstractness (A) : the ratio of the number of abstract classes (and interfaces) in the analyzed package to the total number of classes in the analyzed package. The range for this metric is from 0 to 1, with A = 0 indicating a very specific package and A = 1 indicating a completely abstract package.

Instability (I) : the ratio of the efferent bond (Ce) to the total bond (Ce + Ca), such that I = Ce / (Ce + Ca). This indicator is an indicator of the resistance of the package to change. The range for this metric is from 0 to 1, with i = 0 indicating a fully stable packet, and i = 1 indicating a completely unstable packet.

(D): A + = 1. . . (x = 0, y = 1), (x = 1, y = 0). 0 1, D = 0 , , D = 1, , .

.

enter image description here

(D). D (D ' ), -0.5. , , 0 1. wikipedia , . . ?

enter image description here

- ? , , , ?

+4
1

D - "", , ... , , .

, " ", ... .

+1

Source: https://habr.com/ru/post/1529392/


All Articles