- Afferent Coupling: An integer metric which represents the number of components that are dependent on this object. In other words, it denotes the object's responsibility. Generally, core frameworks (struts), logging packages etc. can have high afferent coupling. It is good to know afferent coupling because changing packages such has struts etc. drastically can cause ripple effects throughout its dependent packages.
- Abstractness: Is the ratio of abstract to concrete classes. It is always easier to change components with higher abstractness without causing too much ripple effect. If the abstractness of a component is low and the afferent coupling high, there is a chance of software entropy (too many interdependencies).
- Efferent Coupling: The number of components that a particular component depends on (inverse of afferent coupling). High efferent coupling, combined with high afferent coupling and low abstractness will pose a huge challenge for the long term viability of a software architecture.
- Instability: It is the ratio of the efferent coupling to the sum of afferent and efferent coupling (Ce /(Ca + Ce)). If this ratio is closer to 0 for a component, the component may be considered stable, since, the more a component is relied on, the less likely it is to change. On the other hand, if the ratio is closer to 1 (afferent coupling = 0) then, any dependency change will affect this component and hence it is more unstable.
- Distance from the main: If you plot Abstractness along the Y-axis and Instability along the X-axis, then the main sequence is a line on the cartesian coordinates X=0 and Y=1 to X=1 and Y=0 (neither of them can be greater than 1). The distance from this main sequence represents the level of balance in the system. This can help you understand how a specific change may affect the maintainability of your architecture.
Tuesday, April 25, 2006
Code quality for software architects
In the latest installment of In pursuit of code quality, Andrew Glover discusses the quality aspects that affect the long-term viability of a software architecture. Various coupling metrics that help the architect to analyze and support the software architecture in the long run are discussed. Coupling metrics represent the higher aspects of code such as code dependencies, stability and abstractness. The coupling metrics discussed in this article are:
Labels:
patterns
Subscribe to:
Post Comments (Atom)
Popular Posts
-
JUnit 4 introduces a completely different API to the older versions. JUnit 4 uses Java 5 annotations to describe tests instead of using in...
-
In a previous post, I described how to use Quartz scheduler for scheduling . In this post, I describe the configuration changes required for...
-
This post will describe how to create and deploy a Java Web Application war to Heroku using Heroku CLI. You will need a basic understanding ...
-
The previous post described the Strategy pattern in brief. I listed out where and why the strategy pattern may be used. This post describes...
-
Acegi Security provides a comprehensive security solution for J2EE-based enterprise software applications, built using the Spring Framework...
-
In the past, I had a few posts on how to implement pagination using displaytag( 1 , 2 ). That solution is feasible only with small result se...
-
This is an example code for a simple PDF merge using iText 5. We use three InputStream s in a List as input and merged file is written to th...
-
New posts with iText 5.5.12 Following are two new posts for PDF Merge with iText 5.5.12 Merge PDF files using iText 5 Merge and Paginate PDF...
-
The previous post described how to implement a JMS messaging client using Spring JMS . This post will describe how to implement the Message ...
-
Recently I was attempting to deploy to weblogic from a Jenkins installed on a Red Hat Enterprise Linux Server release 7.3 , to a remote Webl...
No comments:
Post a Comment