XML11 – An AJAX Development Methodology

I need to thank Google for this. I watched a fascinating presentation by Arno Puder a Google TechTalk. XML11, like Google Web Toolkit, is a methodology for building AJAX applications in Java. But the similarity stops there. While Google compiles Java sources into JavaScript, XML11 does it from Java bytecode. Not having the resources of a company like Google, this team does some very innovative work and use existing tools. But I like their philosophy. All you need to do is to take you Java AWT desktop compiled application and use XML11 to produce an AJAX app.

The video is worth watching since Arno goes through a step by step process of what they do, how they do it and why they made the decision to do it. Here are the highlights.

  • XML11 name is inspired by X11 since the way this tool works is similar in concept
  • XML11 takes a Java/AWT desktop application and starts with the produced bytecode.
  • The bytecode is converted to an XML format
  • The XML file is them transformed into JavaScript using XSLT
  • They Java Virtual Machine is a stack machine and the intermediate XML format reflects this

There are several reasons, I like this approach, assuming that it works.

  1. You do not have to rewrite the code using a new toolkit like GWT
  2. A lot of people are already familiar with AWT programming and they can produce and test their code using Eclipse and then simply convert it to a working AJAX application.
  3. Both the xml format and the protocol of communication between AJAX client and server are extensible

Arno sums up the presentation with a list of differences between the GWT approach and XML11 approach.

Philosophy – GWT uses the Web App development model, XML11 uses the Desktop development model to build Web Apps

Cross Compiler – GWT cross compiles from Java sources while XML11 is a Java bytecode cross compiler

Widget Toolkit – GWT uses proprietary Google Widgets whereas XML11 uses the familiar AWT widgets

Debugging – GWT requires special hooks into the browser for debugging while XML11 lets you use Java native debugger

The major difference, which may ultimately decide the fate/popularity of the toolkit is how well it works and what kind of support the team can provide. It is an open source project. You can get more information at xml11 site.

This is a unique application of XML. XML is used to describe a stack machine. When one of the members of the audience asked Arno, why they chose XML instead of using some other format, he had a pretty cool answer. They can do a similar translation from a .NET app (using the .NET IL which is conceptually similar to java bytecode) to the intermediate XML format as well. Then, the rest of the tools (converting XML to JS) can be reused.

2 thoughts on “XML11 – An AJAX Development Methodology

  1. Hi,

    I have tried GWT on MAC system. I used linux version and got the compiled code on Mac. Later when I try executing rpc calls, I find that the generated code is not performing many action listeners. I am not sure where the problem is.

    Can you help me to see, if rpc calls and some event listeners not working – is due to problem with Safari browser or due to problem with Mac OS ? That would be great.

    More than that, it would be great if you could help me thought here. if I choose to use XML11, can that be used in Mac OS and in Safari browser ?

    Thanks a lot.
    Renganathan K

Comments are closed.