Information Technology Reference
In-Depth Information
Instability = Efferent Coupling / (Efferent Coupling +
Afferent Coupling)
NDepend for the .NET platform is an open source project that
reports Efferent Coupling, Afferent Coupling, Instability, and a num-
ber of other interesting architectural metrics. These metrics are
reported by assembly and by class. The tool is easily executed via
NAnt and produces reports in both XML and HTML formats. The
HTML report in Figure 7-3, for example, displays metrics for a .NET
assembly, which in this case is the NUnit framework.
Note how the nunit.framework assembly has an Afferent Cou-
pling of 204 and an Efferent Coupling of 43. This is the core code of
the NUnit framework, which means this code can't change easily.
Hence, the Instability value for this assembly is 0.17—because so
many other objects depend on this core code, there is little chance that
this code can change without something breaking quickly. For another
assembly containing tests, nunit.mocks.tests , NDepend reported an
FIGURE 7-3
NDepend report
Search WWH ::




Custom Search