|
The efferent coupling of a type or package is the number of other types or packages it directly depends on.
If the efferent coupling of type T is high, it is an indication that T depends on many other types,
and it is therefore likely to be easily influenced by changes to other parts of the system. In such cases you probably want to drill down further and explore
the reasons for the dependencies.
Example Queries
The following query finds types with an efferent coupling greater than 35 and returns them in decreasing order:
from RefType t, int n
where t.fromSource() and
n = t.getMetrics().getEfferentCoupling() and
n > 35
select t, n order by n desc
References
Robert C. Martin. OO Design Quality Metrics. October 24, 1994.
Robert C. Martin.
Agile Software Development, Principles, Patterns and Practices.
Addison Wesley, 2002.
Andrew Glover.
In Pursuit of Code Quality: Code Quality for Software Architects.
April 2006.
Jack Shirazi and Kirk Pepperdine.
Eye on performance: Determining the riskiness of change.
July 2004.
|