Afferent Coupling definition
- It is a code quality metric.
Afferent Coupling purpose
- The number of classes in other packages that depend upon classes within the package is an indicator of the package’s responsibility.
Afferent couplings (Ca) and Incoming (Fan-in)
- Afferent (incoming) couplings :
- Who depends on you.
- Measure of how many other packages use a specific package.
- Incoming dependencies.
- Afferent couplings signal inward.
- Afferent coupling measures how many classes depend on a given class and has the following characteristics :
- Classes with high afferent will affect other classes when changes are made.
- A large afferent coupling can indicate that you should reconsider the responsibilities of the class, because it will be very difficult to make changes to this class later when so many other classes are dependent on it
More informations for the Scrum PSD certification here.