Feel Love for the Google Web Toolkit

The Google Web Toolkit (GWT for short) is unlike any other AJAX Api you’ve seen to date. GWT is nothing new to the world, it was introduced ages ago, and yet I’m supprised by the seemingly slow uptake of this amazing toolkit. Unlike DOJO, jMaki and co, GWT doesn’t even need you to code HTML! Thats right, no JavaScript, no HTML. So how does GWT work?

GWT is actually a Java compiler. Normally your Java compiler takes you Java source-code and spits out Java byte-code, GWT’s compiler however takes you Java source-code and spits out JavaScript. So you code your application using the lovely (really really nice) GWT Api’s, and run it through their compiler, and you’ve got a 100% cross-browser web-application. They include classes for all the standard HTML forum components; AJAX calls back to the server; and some extra Widgets like a Tree, Tab panel, Dialog or Popup DIV; and even an XML parser.

I’m working on a system that uses XML and XSLT heavily, the fact that I can have the browser construct the entire XML document and send it to me when the user is done with it makes a huge difference. All my servlet has to do with the XML is run it through a parser with validation enabled.

Advertisements

2 Responses to “Feel Love for the Google Web Toolkit”

  1. Pierre Says:

    Hi,
    Well i’m working on a project which look very similliar to your system, an XML file will be sent to my client through a servlet that parse it, and my client will construct an xml file, I’ll be using the RPC

    Will you please give me some feedback about your method
    Reagards,
    Pierre

  2. Jason Says:

    We had the GWT client hold an edit a Document object, which we then turned into plain XML text and sent to the servlet via HTTP. The servlet stored the XML on the disk and ran it through a series of XSLT templates, which produced HTML files onto the disk. Those made up a simple web site for our various clients. The GWT application formed the editing part of the system.

    When a user logged in to edit their site, we picked up the XML Document from the disk, and sent it through to the GWT client (or rather, the client requested it from the server). That XML structure held all the information for the users web site.

    Hope this helps a bit 😉


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: