« Agile Software Development: review | Main | Sing Li on JMX »

Scott Sterling tweaks JDepend

Java Testing, Tools, and Engineering

Scott Sterling has a made small but excellent hack to JDepend so as to look at the java.* packages. It turns out that java.lang has dependencies on the likes of java.io and java.awt. Probably that's worth filing as a bug report; on the other hand one could argue that the JDK itself is the granule of release.

Let it be said, there are disclaimers on JDepend and in Martin's work pointing out that dependency analysis and metrics are imperfect, meant to be used as guides and taken with a grain of salt. I agree and understand that, but I also see a lot of sense in Martin's work that I think isn't generally applied or followed in the software business, but should be. A big problem, as with many "advanced" engineering tools and techniques, is that most people know nothing about them or have only an academic knowledge of them.

Yep. On the other hand, JDepend is incredibly useful as a compass for big refactorings. I ran it over a messenging hub we've built at Propylon. This project has seen two short, intense bouts of work during the last six months with some simmering inbetween. To go forward I felt the package structure surely needed cleaning up (in particular to move stuff around to enable plugin transports). Now, before I ran JDepend over it, I wrote down where I thought the packaging hotspots would be - this is not a huge codebase, I'd guess less than 20,000 lines including JSP bits and bobs, but it has a lot of packages. It turned out I was about half-right, which is to say I was as good as flipping coins. Once you don't take the numbers too seriously JDepend is unquestionably your friend, the I Ching of dependency management in Java. Kudos to Mike Clark and Bob Martin.

Btw, Scott's looking for exempler package structures. As I recall from before Christmas, it won't be Catalina, Axis, or JBossMQ, but JUnit has decent numbers, as does James Clark's Trang and Jing.


January 2, 2003 11:32 PM

Comments

Trackback Pings

TrackBack URL for this entry:
http://www.dehora.net/mt/mt-tb.cgi/859