ECMAScript for XML (E4X): A Simpler Programming Model
Track: Late Breaking News, Core Technologies, Client Applications
Audience Level: Technical View
Time: unscheduled
Keywords: Application Architecture, Authoring, Browser, Design, DOM, Enterprise Applications, Functional Programming, HTML, Internet, Java, JavaScript, Middleware, Mobile, Namespaces, Query Language, Schema, Search, XHTML, XML, XPath, XQuery, XSL-FO, XSLT
Abstract:
Developing software to create, navigate and manipulate XML data has become a significant part of almost every developer's job. Developers are inundated with a wide variety of data encoded in XML, including web pages, web services, deployment descriptors, configuration files, project make files and a variety of XML vocabularies for vertical industries (from purchase orders to target lists).
Unfortunately, current XML processing techniques require developers to learn and master a complex array of new concepts and programming techniques. XML programming models often seem heavyweight, cumbersome and unfamiliar for the average developer. Therefore, reading, writing and maintaining XML code can be tedious, time consuming and error prone requiring a heap of reference manuals and a large technology stack.
ECMAScript for XML (E4X) was recently approved as an international standard (ECMA-357) with broad industry support from companies including Microsoft, IBM, BEA, Macromedia, Mozilla, RIM, and Palm. E4X extends the JavaScript object model with native support for XML data. It reuses familiar JavaScript operators for creating, navigating and manipulating XML, such that anyone who has used JavaScript is able to start using XML with little or no additional knowledge. The extensions include native XML data types, XML literals (i.e., initializers) and a small set of new operators useful for common XML operations, such as searching and filtering.
Authoring applications with E4X has a number of advantages. Applications written with E4X are smaller and more intuitive to the average developer than comparable XSLT or DOM applications. They are easier to read, write and maintain requiring less developer time, skill and specialized knowledge. The net result is reduced code complexity, tighter revision cycles and shorter time to market for network applications. In addition, E4X is a lighter weight technology useful for developing applications on a broad range of computing platforms from large-scale servers to mobile devices.
This presentation will give an overview of E4X, motivate its use in applications, and provide a live demonstration of E4X code using a preview of the Mozilla open source implementation.
XML version
HTML version
PDF version
SVG version