I’m currently porting an AJAX style web application written entirely in Javascript, to a Google Web Toolkit (GWT) web application written in Java.  I’m doing this because I am no Javascript guru and I wanted to further extend the original project so it was either now or never to make the more comfortable switch to Java. The other reason is the web application needs to work with a lot of complex XML as it interacts with SOAP web services. To this point, I haven’t found a Javascript equivalent of XMLBeans which does a fine job of binding XML schemas to Java objects.

The original Javascript web application used the following libraries:

  • Ext JS – Javascript framework for UI/widgets (licensed)
  • OpenLayers – Javascript library for displaying dynamic maps (open source)
  • Apache CXFWSDL2JS tool for generating Javascript web service client stubs (open source)

The GWT equivalent libraries that I am using for the ported project are:

  • Ext GWT – Java framework for UI/widgets (licensed)
  • GWT-OpenLayers – GWT wrapper for OpenLayers (open source)
  • Metro/JAX-WS – Wsimport tool for generating Java web service client stubs (open source)

The development environment for the original Javascript project was Netbeans (6.5) for coding, AppServ (Apache web server) for deployment and the Firefox Firebug plugin for debugging.

The ported Java project is being developed entirely in Netbeans (6.7.1), using the bundled Glassfish application server and GWT Hosted Mode within the IDE for debugging.

From an architecture point of view, the GWT project is going to be a little different from the original Javascript application. The Javascript application made client side AJAX/XMLHttpRequest calls to a variety of web services.

Note. To support Javascript cross-site scripting you can configure Apache web server using the mod_rewrite/proxy method detailed in this post http://premshree.livejournal.com/66129.html

The GWT project on the other hand, will utilise GWT’s Remote Procedure Call (RPC) mechanism to decouple GWT client-side and server-side code. The client-side code will be the presentation layer (UI) and will make RPC calls to the server-side code which will consume a variety of web services, returning the response back to the client-side for presentation.