home
NEWS       BLOGS       FORUMS       NEWSLETTERS       RESEARCH       EVENTS       DIGITAL LIBRARY       CAREERS  
Network Computing Network Computing Powered by InformationWeek Business Technology Network

IMMERSE YOURSELF:

SOA

  |

Data Center

  |

802.11n

  |

Data Privacy

  |
APO  |

Virtualization

  |

NAC

  |

Security

  |

Network Mgmt

  |

Enterprise Apps

  |

Storage & Servers



Netdesign Manual

Part 3

Java XML Programmers Reference

Chapter 11: XML Tools for Information Appliances


October 8, 2001


Brought to you by:





Check It Out!

Translets vs. Traditional Transformation Engines

There are at least four reasons why information appliances needing to do XSL transformations should consider translets over traditional transformation engines:

  • Smaller memory footprint — translet and runtime classes are minimized by including only those XSLTC features required for that particular transformation
  • Performance — Sun claims performance gains between 30-270% over Saxon, Xalan, and XT processors, depending upon stylesheet and XML input sizes — performance is even more of a key issue on limited devices
  • Freedom — runtime and translet classes are Java 1.1 bytecode
  • Reduced network traffic — XSL stylesheets need not be downloaded as they are already distributed with an application

Let's discuss each of these in a little more detail.

Smaller Memory Footprint

Traditional transformation engines have large memory footprints. For example, Apache's Xalan-Java 2.0.1 requires xalan.jar and xerces.jar (the Apache Xerces XML parser). This represents over 2.2 MB of bytecode! Not many would argue that this is an unreasonable demand for most of today's lightweight clients.

Translets, on the other hand, require three things:

  • The XSLTC runtime JAR xsltcrt.jar (119 KB, 117 KB reduced)

  • The xml.jar file (126 KB)

  • Any translet class files your application needs to use (typically 2 —10KB each, depending upon the size and complexity of the original XSL stylesheet)

XSL functionality used in most stylesheets is included in xsltcrt.jar, while functionality specific to certain stylesheets (and not already included in xsltcrt.jar) is compiled into those stylesheets' translets. This approach minimizes the size of the runtime library without sacrificing XSLT compatibility.

xml.jar was Sun Project X, the precursor to Apache Crimson. It contains the SAX 1.0 and DOM Level 1 interfaces, as well as SAX and DOM implementations. It's important to note that since this JAR file is required at runtime, you are given SAX and DOM parsers for free; there's no need to include another parser such as NanoXML.


Since translets require Sun Project X (xml.jar), which contains both SAX 1.0 and DOM Level 1 parsers, there's no need to include another parser in your lightweight client. The parsers in xml.jar can be used independently and separately from translets, if needed.


Finally, the compiled XSL stylesheets themselves must be available on the target lightweight platform. These vary in size depending upon the original XSL stylesheet, but are usually 2—10KB. Of course, multiple translets can be deployed for a given application, allowing the application to transform different document classes in a variety of different ways.

Performance

The following performance graph was generated from data gathered by XSLTMark (http://www.datapower.com/XSLTMark/).

Kilobytes per second are the total number of bytes in the input and output XML documents divided by twice the elapsed time. See http://www.xml.com/pub/a/2001/03/28/xsltmark/results.html for more information. Although we have compared two different sets of data in the same graph (something the XSLTMark authors warn against), we have still used the graph for general comparisons. With an older version of XSLTC, we see it is second only to XT. Newer versions of XSLTC claim even better performance gains. Since the release notes for release Alpha 5 specifically state, "performance has been greatly improved" over Alpha 4, we'll have to perform more benchmarks to get the clearest performance picture.

Michael Kay, the creator of Saxon, stated in XSLT Programmer's Reference, 2nd Edition ISBN 1861005067, that he has found translet performance to be roughly comparable to Saxon and XT.

Clearly, XSLTC is a contender in regards to performance with the large, conventional XSLT processors. However, this only serves to draw attention to XSLTC's supreme advantage over these processors — the small size of the generated stylesheet bytecode compared to running a transformation in a large, powerful interpreter.

This is one factor which clearly points towards a big future for translets within information appliances.

Freedom

Although the XSLT compiler requires Java 2, the class files it generates can be used with any Java VM. This is an important point because even though we may not be able to compile XSL stylesheets on lightweight clients, we should always be able to use translets on lightweight clients with J2ME.

Reduced Network Traffic

Since translets can be distributed with an application, XSL stylesheets no longer need to be downloaded from a server. This is good news for devices using constrained wireless networks, such as the 9.6 kpbs Cellular Digital Packet Data (CDPD) connection. The flexibility of downloading new stylesheets as needed is not always lost, however. Translets, if used in applets, can be downloaded from the server on which the applet was downloaded just like any other Java class.

PAGE: 1 | 2 | 3 | 4 | 5 | 6 | NEXT PAGE
 





Ready to take that job and shove it?

Function:

Keyword(s):

State:
SPONSOR
RECENT JOB POSTINGS
CAREER NEWS
Go beyond Google and get vertical. These specialized search sites will help you find the business information you need -- fast.

Ari Balogh was named to the post of chief technology officer as the companys for a "realignment" of employees.










InformationWeek U.S. IT Salary Survey 2008
Salaries for business technology professionals are falling. Here's what you need to know in order to make good hiring decisions and personal career choices. Download Today
 
ROLLING RIGHT ALONG
Follow key Network Computing Reviews from conception to completion. This Week: Holistic APM.



Network Computing Reports Emerging Enterprise Podcast Series: Secrets to Success








TechSearch


Microsite of the Week


Powerful Information at Your Fingertips



InformationWeek Business Technology Network
InformationWeekInformationWeek 500InformationWeek 500 ConferenceInformationWeek AnalyticsInformationWeek CIO
InformationWeek EventsInformationWeek ReportsInformationWeek MagazinebMightyByte and SwitchDark Reading
Digital LibraryIntelligent EnterpriseInternet EvolutionNetwork ComputingNo Jitter
space
Techweb Events Network
InteropVoiceConWeb 2.0 ExpoWeb 2.0 SummitEnterprise 2.0 ConferenceMobile Business ExpoSoftware ConferenceCSI - Computer Security Institute
Black HatGTECEnergy CampMashup CampStartup Camp
space
Light Reading Communications Network
Light ReadingLight Reading EuropeUnstrungLight Reading's Cable Digital NewsConstantinopleInternet Evolution
Heavy ReadingLight Reading Live!Light Reading InsiderEthernet ExpoOptical ExpoTeleco TVTower Technology Summit
space
Financial Technology Network
Advanced TradingBank Systems & TechnologyInsurance & TechnologyWall Street & TechnologyAccelerating Wall StreetBank Systems & Technology Executive SummitBuyside Trading SummitInsurance & Technology Executive Summit
space
Microsoft Technology Network
MSDN MagazineTechNetThe Architecture Journal
space
App Infrastructure   |   Messaging & Collaboration   |   Network & Systems Mgmt   |   Network Infrastructure   |   Security  |   Storage & Servers   |   Wireless   |   Enterprise Apps
About Us  |  Contact Us  |  Site Map  |  Technology Marketing Solutions  |  Advertising Contacts  |   Briefing Centers
Copyright © 2008  United Business Media LLC  |  Privacy Statement  |  Terms of Service  |  Your California Privacy Rights