|
|
Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Page 6 of 6
<xsl:template match="table">
<table cellpadding="0" cellspacing="0" border="0" bgcolor="red">
<tr>
<td valign="top">
<table cellpadding="4" cellspacing="1" border="0">
<xsl:apply-templates select="tr"/>
</table>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
Model 2X's current implementation dynamically creates an XML DOM tree and sends it to the XSLT transformer. Using SAX (Simple API for XML) notably enhances performance, particularly latency and large documents' memory footprints. In addition, stylesheet compilation improves XSLT processing times. Xalan, the Apache Project's XSLT processor, provides a mechanism to compile stylesheets into a set of Java classes, known as translets.
The latest browsers, such as Internet Explorer 5/6 and Mozilla, can perform client-side transformations, which can relieve application servers' processing load. Similarly, XInclude (XML Inclusions), if supported, can download and cache resources and other data from the application server. XInclude provides a generic mechanism for recognizing and processing inclusions, and as such, can offer a simpler overall authoring experience, greater performance, and less code redundancy. This approach's drawback: developers must ensure that the XML documents and stylesheets sent to the clients contain only information the user is allowed to see.
In conclusion, XML and XSLT use in Model 2X encourages developers to separate business and presentation logic and brings the Web applications world a step closer to delivering on MVC's original promise. Additional benefits, such as well-formed output documents, reliance on standardized languages, increased presentation layer flexibility, and shortened development cycles make the new model not only elegant but also powerful and efficient.
You could easily improve the simple implementation described in this article to refine the model, tune performance, and add flexibility.
Read more about Enterprise Java in JavaWorld's Enterprise Java section.