[ Documentation ]
XML11 is an abstract windowing protocol inspired by the X-Windows protocol developed by MIT in 1984. The main idea is that a web browser serves as a generic client just like an X-Server can render any user interface. The difference to traditional HTML-pages is that XML11 builds the user interface dynamically at runtime, while an HTML-page is a static description of a web page. XML11 Architecture

The figure to the right shows the overall architecture of XML11. Basically XML11 is separated into a client side and a server side implementation, each having a similar structure. XML11's client components are implemented in JavaScript while the server-side uses Java 5. For application developers there is no need to work with JavaScript to get an XML11 application running. In the following XML11's architecture will be explained in detail.

XML11 is comprised of different layers having clearly defined responsibilities. Each layer is built on top of the functionality provided by the layer below. The application running under XML11 is situated on the topmost layer. Its server part contains most of the application's business logic whereas the client part contains all the functionality that will be run inside of the browser according to the AJAX paradigm. Although both parts make use of XML11's kernel, developers implementing XML11 applications are not aware of this. XML11 applications are implemented in Java using well-known standard APIs like AWT, Swing or SWT. As a consequence, applications can be run as XML11 applications as well as desktop applications.

The XML11 kernel transparently provides services like handling of the XML11 windowing protocol, generation and distribution of the application's client components and communication between the distributed parts of the application (implicit middleware). Additionally the kernel is responsible to support an application's session management.

Since XML11 applications are completely implemented using the Java programming language, a translation to JavaScript is required for those parts of the application that will be run inside the browser. This is accomplished by using a specific ClassLoader that translates the Java class files to JavaScript. This ClassLoader uses functionality of XMLVM to perform the translation. In a first step XMLVM translates the class file to an equivalent XML representation. In a second step this XML is translated to JavaScript using an XSL transformation. Using XML as an intermediate representation allows to support other client-side languages like ActionScript simply by changing the XSL stylesheet. For details on our Java to JavaScript translation see the XMLVM homepage.

Both the XML11 kernel and XMLVM rely on the communication services provided by XMLOB. As its name suggests, XMLOB is an object broker that allows objects to communicate with each other by exchanging messages. XMLOB uses HTTP as its transport protocol. On the client side access to the HTTP protocol is gained using JavaScript's XMLHttpRequest object. The Java based server implementation supports different mechanism's by introducing an abstraction layer between XMLOB and the concrete API which is used to access the HTTP protocol. Currently there is one implementation available based on Simple. An implementation based on a J2EE web application is planned for the near future.

During the boot-strapping of XML11, several objects are registered with XMLOB on the client- as well as the server-side. Some of these objects, that are also shown in the example PDUs below, are briefly explained in the following:

  • sessionManager: This object resides on the client-side. It is used to implement session management for XML11 applications. As can be seen in the example PDU below, a unique session id is assigned to every XML11 application.
  • awtManager: The awtManager is a client-side object as well. Its most important services are the creation and deletion of the AWT widgets' browser representations. Every time a new AWT widget is created by the application running on the server-side, a message is sent to this object, instructing it to create the appropriate client representation of this widget.
  • modelManager: The modelManager lives on the side of the XML11 server. Client-side changes of a widget's model (e.g., entering a text into a text field) yields in a message being sent from the application's client portion to the modelManager. The modelManager in turn calls the server-side widget peer to update its model so that the state of the client and server are in sync again.
  • eventManager: Events created by a widget on the client-side are propagated to the eventManager existing on the side of the XML11 server. The eventManager instructs the widget's peer to create the corresponding event object and dispatch it to the AWT's event queue.

As an example, imagine a simple AWT application that implements a Celsius-to-Fahrenheit converter. Such an application would use a GridLayout, a button, input field and labels for the user interface. Here is a screenshot of what the application might look like if run as a desktop application:

Celsius-to-Fahrenheit Converter

If the same application is run as an XML11 application, the following messages would be sent to the browser:

<ob:xmlob xmlns:ob="http://www.xml11.org/xmlob/">
<ob:message ob:target="sessionManager" ob:method="setSessionID" sessionID="10da7741ed5"/>
<ob:message ob:target="awtManager" ob:method="createWidget" type="window" pid="ELEM_0" id="ELEM_0"/>
<ob:message ob:target="awtManager" ob:method="createWidget" type="panel" pid="ELEM_0" id="ELEM_1"/>
<ob:message ob:target="awtManager" ob:method="createWidget" type="textbox" pid="ELEM_1" id="ELEM_2"/>
<ob:message ob:target="awtManager" ob:method="createWidget" type="label" pid="ELEM_1" id="ELEM_3"/>
<ob:message ob:target="awtManager" ob:method="createWidget" type="button" pid="ELEM_1" id="ELEM_4"/>
<ob:message ob:target="awtManager" ob:method="createWidget" type="label" pid="ELEM_1" id="ELEM_5"/>
<ob:message ob:target="ELEM_1" ob:method="setBounds" width="224" top="0" height="64" left="0"/>
<ob:message ob:target="ELEM_2" ob:method="setBounds" width="112" top="0" height="32" left="0"/>
<ob:message ob:target="ELEM_4" ob:method="setBounds" width="112" top="32" height="32" left="0"/>
<ob:message ob:target="ELEM_4" ob:method="setLabel" label="Convert..."/>
<ob:message ob:target="ELEM_3" ob:method="setBounds" width="112" top="0" height="32" left="112"/>
<ob:message ob:target="ELEM_3" ob:method="setText" text="Celsius"/>
<ob:message ob:target="ELEM_5" ob:method="setBounds" width="112" top="32" height="32" left="112"/>
<ob:message ob:target="ELEM_5" ob:method="setText" text="Fahrenheit"/>

The XML above is only an excerpt and normally would also contain the properties of the other widgets. We use our own light-weight middleware we call XMLOB (XML-based Object Broker) to send messages between the client (i.e., the browser) and the server. The aforementioned awtManager, upon receiving these messages, would render a user interface similar to the screenshot shown above. If the user pushes the "Convert" button, the browser will sent the following messages to the XML11 server:

<ob:xmlob xmlns:ob="http://www.xml11.org/xmlob/">
<ob:message ob:target="modelManager" ob:method="updateValue" value="0" id="ELEM_2"/>
<ob:message ob:target="eventManager" ob:method="raiseEvent" type="clicked" id="ELEM_4"/>

The XML11 server will then insert an event into the applications event queue that eventually will invoke the applications actionPerformed() method. This method performs the computation that results in another update to the browser shown by the following XMLOB messages:

<ob:xmlob xmlns:ob="http://www.xml11.org/xmlob/">
<ob:message ob:target="ELEM_5" ob:method="setText" text="32 Fahrenheit"/>

One particular AWT application that can be run as an XML11 application is WeirdX. WeirdX is a Java AWT implementation of an X-Server. Normally, WeirdX will open a window on the desktop of the machine where it is launched. By running WeirdX as an XML11 application, XML11 will intercept the opening of that window and send an XML11-PDU to the browser. The consequence is that XML11 can render X-applications inside a web browser without requiring a JRE-plugin inside the browser. In the screenshots section you can see xcalc running inside Internet Explorer.


2004          [1]    A. Puder
Extending Desktop Applications to the Web.
In Second Workshop on Distributed Objects Research,
Experiences & Applications (DOREA 2004)
, Las Vegas, ACM Proceedings.
2005 [2] A. Puder, S. Desai
Accessing X Applications over the World-Wide Web.
DOA 2005, Agia Napa, Cyprus, LNCS, Springer.
[3] A. Puder
An XML-based Cross-Language Framework.
DOA 2005, Agia Napa, Cyprus, LNCS, Springer.
[4] A. Puder
XML11 - An Abstract Windowing Protocol.
PPPJ Journal Special Issue, Elsevier.
2006 [5] A. Puder
A Code Migration Framework for AJAX Applications.
DAIS 2006, Bologna, Italy, LNCS, Springer.
SourceForge.net Logo
Valid CSS Valid XHTML 1.1