I'm dialed in and listening to Don Brown presenting on Struts and XML/XSL. Don is a lucky guy - he's presenting from Hawaii this morning, where I'm assuming he lives. The bad part for him - it's 5:30 in the morning there. Don is one of the developers of Stxx and has also developed a Cocoon plugin for Struts. He works for DigitalNet and currently is working on a contract for the Navy. Hmmm, wonder if they're hiring - I'm willing to bet that Julie would consider moving to Hawaii! Enough dreaming - onto the presentation.
The following are types of XML/XSL Extensions for Struts:
- XML pipeline-based
- Cocoon Plugin
- replaces JSP with XSL
- in action, create XML manually, or get it from another source
- stylesheet selection based on criteria like browser type
- automatic serialization of ActionErrors, resources, and request objects
- extendable to support any object serialization or XML transformation technology
- supports both Struts 1.0 and Struts 1.1
Pretty cool - for Struts 1.1, there's a Stxx plugin, and you use a
.dox extension to indicate it needs transformations. In a stxx-transformations.xml, you define "transformations" that define XSL stylesheets, where to run at (client|server), and mimeTypes (html|xml|pdf). Sweet - maybe I can use this sucker for struts-resume! I wonder how Stxx compares with StrutsCX. Since Stxx can be plugged-in and can co-exist with JSPs, it might be the right path for me.
Advantages of Stxx: Simple, use of caching makes tranformations quick, can be used with Velocity or Cocoon, lighweight, very extendable.
Disadvantages: XML pipeline very limited, poor scaling of message resources (if ApplicationResources.properties in huge - i.e. > 1MB), requires all data to be gathered in Action (MVC-push).
Compared to StrutsCX - Don says that it's very similar, except that StrutsCX supports the Validator. As for the Cocoon Plugin, it supports all the features of Cocoon. Describing the features of this plugin seems pointless as I would just be describing features of Cocoon. For the Cocoon PlugIn, you define it the same as a regular plugin, and then change your path to point to an XHTML-compliant JSP. Apparently, Don has modified the struts-example app to use the Cocoon PlugIn, so hopefully I can provide a link to the download.
Here are some resource links from Don's presentation that might interested you:
- stxx - http://stxx.sf.net
- StrutsCX - http://it.cappuccinonet.com/strutscx/
- Cocoon - http://cocoon.apache.org
- Cocoon Plugin - http://www.twdata.org/struts/
- Database Layer - http://www.ibatis.com
As for my presentation on Remember Me and XDoclet, you can find those slides here. The slides (and lab) uses a simple JSTL-based app I whipped up last weekend. I'm planning on hooking it into a database eventually to allow online editing of a presentation, but I probably won't do that until I give another presentation.