I'm posting this here because, although it is not directly XDoclet related, it is a tool that is similar in theory to XDoclet and complements it very well.
 
I have posted version 1.0 RC 1 of Hoople, a tool to help with the management of Struts, Spring, and JSF configuration files, as well as create Google Sitemaps and more at http://www.sundog.net/hoople
 
Hoople is like attribute-oriented programming, but based on URLs rather than Java classes. It allows you to split up your struts-config.xml, etc. files by having an actual file on the filesystem for each URL the system will have. Each of those files contains the configuration for that URL that would have gone into the main config file as well as any other "URL Logic" associated with it, such as if/how it should be searched, security information, logging, etc. 
 
While XDoclet itself has support for configuring Struts, Spring and JSF mappings in Java classes, we have found that some limitations with this.  Mainly:
1.  It is difficult to know what the URLs are on the system without looking searching through Java classes which are not always organized by website location.  This is an especially difficult problem when you have non-programmers who help with the development of the site.
2.  You cannot map the same action class to multiple different URLs
Addional benefits of using files on the filesytem where the URLs would normally be served from include:
1. Having the welcome-file-list actually work for URLs managed by Struts/Spring/JSF because the application server sees there is a file there and doesn't simply return a 404 error without seeing what servlets would respond to it
2. Editors such as Intellij 5 with HTML error highlighting and "go to declaration" commands work the way you expect them to because there is an actual file where the editor expects there to be one.
 
We've used it internally for several years and have found it makes managing config files much easier.  We still use XDoclet for Java class-related configuration such as JDO mapping information, but managing URL-related configuration has worked better us with Hoople.
 
I've marked at as a release candidate rather than final to give people time to finds any bugs and/or have suggestions that may change the API before the 1.0 final release.  Also, any suggestions on the documentation would be greatly appreciated.
 
Nathan Voxland
http://www.sundog.net

Reply via email to