Cocoon for web applications
While I was reading Pavel Sýkora’s article Cocoon by example, I felt a little shiver of excitement. Cocoon belongs to the Apache Jakarta family of projects. It’s a runtime environment, or
a framework if you prefer, for creating and deploying web applications. The article outlines Cocoon’s architecture and how
web applications are deployed in that environment.
If you find it hard to picture how the MVC design pattern is implemented,
Cocoon and this description can help. I like the pipeline approach, with the request
making its way through the pipe.
The discussion below the article raises a performance question about XSL transformation, which takes system resources and
time. From my own experience, I can confirm
that XSL transformations really can swamp a server. Fortunately, Cocoon is
configurable, so for the XSL transformer we can turn to our own
solution, such as caching, or use a technology such as Translets.
Translets, XSL templates converted into prepared Java structures,
have worked well for me for performance reasons, and I can recommend them from experience.
In Cocoon’s case I wouldn’t worry about performance problems precisely because it supports Translets directly.
One more little tidbit. XSL transformations can also be done in hardware. A hardware
XSL transformer is three generations ahead of current software XSL transformers in performance.
I haven’t tested one myself, but the reports I heard were very interesting and the difference in transformation
times was enormous. It wasn’t cheap, at more than $50,000. If the need arose,
this would be another option.
Related articles
Related CZ Podcast episodes
- #217 · Ivo Lukačovič
On Windy, JavaScript and building companies. · Czech audio
- #3 · Java 6 SE, Vývoj webových aplikací
Dagi and Filemon discuss Java 6 and web application frameworks. · Czech audio
- #1 · Vývojová prostředí v Javě
The first CZ Podcast episode looks at Java development environments. · Czech audio