- 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
-
In a previous post, I described how to use Quartz scheduler for scheduling . In this post, I describe the configuration changes required for...
-
JUnit 4 introduces a completely different API to the older versions. JUnit 4 uses Java 5 annotations to describe tests instead of using in...
-
The JDBC abstraction layer of Spring framework offers an understandable exception hierarchy, simplifies error handling, and greatly reduces ...
-
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 ...
-
Last week, I described how to implement JMS, using a stand-alone client and a Message Driven Bean . In this post and the next, I will descr...
-
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...
-
The previous post described how to implement a JMS messaging client using Spring JMS . This post will describe how to implement the Message ...
-
Update: A new post for validation in struts with annotation is available at: Struts 2 Validation: Annotations . Struts 2.0 relies on a val...
-
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...
-
In this post we will see a way to merge multiple PDF files while adding page numbers at the bottom of each page in the format Page 1 of 10 ....
No comments:
Post a Comment