Monday, September 25, 2006

Enhancing the Eclipse Seach Feature

Eclipse allows to easily integrate additional web sites into the usual search. An article on EclipseZone describes how to integrate with JDoc: Using Eclipse Search

Sunday, March 12, 2006

Designing in Java with XML Spy and Jaxb

I recently stated I project where we want to transform a legacy model into XML. The goal is to write the model into XML and later being able to read from XML back into our model.

Nothing special. The challenge is, that the model does not suite very well to easily make it persistent to an XML file. I also do not want to make changes to the production code.

My approach is the following:

We define a more suitable and flexible model with XSD and then use an XSD to Java code generator to generate a new model from the XSD file. An Adapter layer has to be written that mediates between the legacy model and the new XSD based model.

So far the approach comes out very well. I am using XML Spy to design the XSD
and though I used XSD for a few projects it is the first time that I use XSD concepts like inheritance and substitution.

My first approach was to use Castor as source code generator, but Castor had some problems with the inheritance. A friend of mine suggested looking into Jaxb which needed way less configuration than the Castor package and in addition generated a better class structure with Interfaces, Factories, and Implementations.

I am now happily working on the project and it is fun to design your classes in XSD.

Maven 2 Book in Work

Vincent Massol announced on his Maven Blog that a Maven 2 book is in work. From Vincent's blog:
The book will be made available online for free to the community. The target date for publication is Q1 2006.
This is excellent news. I recently stated to migrate from Maven 1 to Maven 2 and the prospects to have soon a book available, written by Maven veterans is very exiting.