XML technologies / XSLT / Java and XSLT / Java-based web technologies / Summary of the main approaches
(Excerpt from “Java und XSLT” by Eric M. Burke)
To separate HTML from Java, neither pure servlets nor pure JSP suffice. The hybrid approach separates them, but may require custom JSP tags for full benefit. WML needs duplication of all HTML-generation code. Custom tags hide Java from page authors, yet HTML generation in Java may still be necessary.
Web frameworks usually build on the hybrid approach with added features and conveniences. Their consistent application structure probably matters more for maintenance than extra features. Their main drawback is potential dependence on one approach and vendor.
XSLT maximally separates presentation and data, supporting multiple browsers and WML. Its extra web-layer processing cost must be weighed against its modular, clean design.
This table summarizes web application approaches’ strengths and weaknesses.
Table: Different web technologies
Technology | Strengths | Weaknesses |
Pure servlets | Fastest runtime performance. | HTML changes require Java changes. Complex pages are hard to maintain. Data, logic and presentation are not separated. |
Pure JSP | Best for display-oriented, mainly static HTML pages with little dynamic content. Fast runtime performance. | Does not enforce Java/HTML separation. Poor request validation. Development and tests require deployment to a web server. |
Hybrid servlet/JSP | Better Java/HTML separation than pure approaches. Modular design is easier to maintain in large projects. Fast runtime performance. | Still needs web-server deployment for development and testing. Does not force code out of JSPs. Less effective than XSLT for multiple device types. |
XSLT | Maximum separation of data, logic and presentation. XML and XSLT can be developed and tested without a web server. Maximum modularity improves maintenance. Different stylesheets easily serve multiple device types and languages. | Slowest runtime performance; wider browser XSLT support would greatly reduce server load. Harder than JSP for mainly static HTML. Requires an extra XML generation step. |
Copyright © 2002 O'Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from “Java und XSLT” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de
back to top