SwingML
Swing Markup Language
Menu
News
About
Demo
Download
Developers
Summary

SwingML is an effort to create a markup language to render in a web browser JFC/Swing based graphical user interfaces.

The Problem

Currently the creation of a graphical user interface for a web based application made in Java is done using several technologies like JSP, Java Beans, XSLT and Servlets. These technologies combined with a little creativity are good to fulfill almost any application requirement but at the end the way the information is conveyed into the web browser is by generating HTML dynamically. HTML is limited and there are moments in which more complex functionality has to be supported, for example a requirement of a tree component with drag an drop capabilities may be a very hard task to perform, this is where JavaScript and Applets are very helpful. JavaScript is a very good language to provide client side functionality however its support in every web browser is different and providing a good crossbrowsing support is hard and time consuming. Applets combined with JFC/Swing components are a great solution to provide client side functionality however retrieving the information from the server side is not a simple task, this can be done using RMI, HttpTunneling or even in a better way: Using XML.

SwingML

SwingML is a specification based on XML that releases the power of the JFC/Swing libraries making them easier to implement in the client side and providing an alternative to replace completely the use of HTML. In the traditional model a server side component returns HTML to the web browser. In the SwingML model a server side component produces SwingML and returns it to the client side where an applet will receive it and use it to render the graphical user interface, this makes possible the creation of graphical user interfaces based totally on Swing instead of HTML.

The project is divided in two sections: SwingML Specification and SwingML Renderer

SwingML Specification

The SwingML specification is based completely on XML. It provides the necessary elements and their attributes to render any JFC/Swing component. Its development is driven completely by the features supported by the SwingML Renderer and the custom components.

SwingML Renderer

The SwingML Renderer is a java applet that takes the SwingML coming from the server side component and uses it to produce a graphical user interface based on JFC/Swing. The SwingML Renderer manages all the events that occurs in the gui and sends back to the server SwingML that represents all the data changes made on the client. The request/response model is used to perform the communication between the client and the server allowing with this server side language independence.