Tuesday, August 25, 2009

Eclipse Plugins For Java Dependency Analysis

Once I got our project's code imported into Eclipse in a usable way, the real work started.

The plan is to upgrade the code to use newer APIs and services. To do that, we need a way to analyze the dependencies, to identify cycles, determine the easiest places to refactor, etc.

A web search found a useful evaluation of various dependency-analyzers for Eclipse.

I tried all of the tools listed in the evaluation, and liked STAN the best.

STAN installs easily, is intuitive to use, and doesn't choke on our million-plus lines of code (after configuring it to analyze class-to-class dependencies instead of at the method level). Plus, questions emailed to STAN are answered quickly--the support is good. We bought a license.

But STAN is a commercial product, and I also needed something to use at home. Something inexpensive.

That's when I noticed a comment at the bottom of the evaluation. (It had been there all the time, but who reads comments, right?)

The comment recommends CAP, and it's a good recommendation. CAP is similar to STAN in terms of ease of installation and use, it doesn't choke on our million-line project, and it's faster than STAN and uses less memory. Plus it's free, which is hard to beat.

However, CAP hasn't been upgraded for a while, and the author is intermittently difficult to contact. Also, STAN has a better display of rolled-up package dependencies (for example, if you have com.abc and com.abc.def, you can see dependencies on com.abc, or com.abc.def, or com.abc*, but in CAP you can only see com.abc or com.abc.def individually).

STAN doesn't offer floating licenses, which makes it pretty expensive if more than a couple engineers will be using it. Dependency analysis is something an engineer might do while learning or refactoring a code base, and then not do again for months, so floating licenses would make sense.

Both tools are good. STAN's package roll-ups are really useful when you have a lot of subpackages. CAP's price is hard to beat.

If you do use CAP, please support open source and send the author a donation. I was the first person to do that, which is kind of a shame.

Update: See this post for another good Java dependency analyzer.

4 comments:

  1. Blogs are so informative where we get lots of information on any topic. Nice job keep it up!!
    _____________________________

    Dissertation Projects

    ReplyDelete
  2. Thanks--I'm glad you found the information useful!

    ReplyDelete
  3. When I bought my computer and I didn´t know how to use java graphics, so I decided looking for information in a webside and I found an useful information that helped me a lot.. Now I am interested in to do the best investment and I found a webside very useful and interesting called costa rica investment opportunities , I think it´s a very wonderful site.

    ReplyDelete
  4. This kind of information is very limited on internet. Nice to find the post related to my searching criteria. Your updated and informative post will be appreciated by blog loving people.

    Online Degree's Dissertation

    ReplyDelete