Friday, August 22, 2008

Java Power Tools cuts straight and true

Part of my summer holiday reading is the book Java Power Tools, by John Ferguson Smart.

I count a computer book a good buy if I get one new idea from it; two is stellar; and three or more goes on my "Recommend to Colleagues" list. This one is on the list... Ideas I`ve picked up include:
  • the XMLTask extension for Ant, that provides easy and powerful editing of XML files. This should make configuring things like web.xml and struts-config.xml a lot easier. It even provides a way to uncomment blocks of XML markup.

  • SchemaSpy, which generates database documentation (including ER diagrams!) from JDBC metadata. The tool also also comes with profiles for interpreting some vendor-specific metadata. It will be interesting to see how it handles spatial datatypes in Oracle and PostGIS...

  • using Doxygen to generate documentation for Java source. Doxygen provides more capabilities than Javadoc, including UML diagrams and a variety of output document formats.

  • UMLGraph also allows generating UML diagrams from Java source, and embedding them directly in Javadoc.

For graph visualization, SchemaSpy, Doxygen and UMLGraph all use the GraphViz application. This looks like a great tool in its own right. It provides a DSL for specifying graph structures and node and edge symbology, along with a layout and rendering engine which outputs to numerous different formats.

JPT of course covers all the better-known tools such as Ant, Maven, CVS, SVN, JUnit, Bugzilla, Trac, and many others. It doesn`t replace the documentation for these tools, but it does give a good comparative overview and enough details to help you decide which ones you`re going to strap around your waist for the next project.


Andrea Aime said...

Ha ha, look at the UMLGraph history, version 4.4... see anyone you know? :)
In all seriousness though, I wasn't able to use the nice tool beyond simple projects... in complex ones there is always a need to hide something here and there, and the javadoc gen time is too long to hack the diagrams to will...
So in the end I fallen back using tools like eUML and do the occasional diagram, the way I want it, when I need it.

Dr JTS said...

Hey, Andrea... Taking a break from the geospatial coding, eh?

Your comment about automated diagrams not being that useful for complex systems makes sense. Sometimes the most important thing in a UML diagram is what you decide to leave out.

Would an answer be to tag or identify classes which should be shown in some annotation or config file? That way at least the diagram could be generated automatically, which should be a bit of a time-saver perhaps?

Anyway, I guess the key message is to not get my hopes up that I no longer have to write documentation... 8^)

kousalya said...

congrats! keep up the good work/this is a great presentation.

Power Tools

aline said...

Looks amazing!!!! /I look forward to your feedback /thanks for this man it was very helpful.

Power Tools