Wednesday, 28 May 2008

Using GWT to Build a High Performance Collaborative Diagramming Tool

Alex Moffat and Damon Lundin (Lombardi)

JavaSript is the scripting language that sits in your web browser and enables many of the interactive web applications that we all know and love.

Google, however, don't write very much JavaScript. They have written a tool instead called Google Web Toolkit (GWT) that writes JavaScript out of a Java application. This means that Google developers can write their web applications in Java rather than JavaScript, which is a good thing. Java and JavaScript are very different.

I'm not the best person to explain the differences between JavaScript and Java but I'll give it a go: Java is a robust, strongly typed, compiled, language that can be written and debugged in a mature Integrated Development Environment (IDE) like Eclipse or Netbeans. JavaScript is...err...none of those things. More importantly, when writing JavaScript your JavaScript code may run differently depending upon the browser that your user is running - writing JavaScript that is compatible across all the different flavours of browser can be painful, to say the least.

Because of GWT, Google developers don't have this problem. They just have to write their Java application and GWT handles the rest. Rather than just being smug and keeping this to themselves, they have made GWT available to the community under an open source license (the Apache license) and are actively promoting and evangelising about it.

This may seem somewhat obscure but it is going to result in a massive efficiency saving in the development of web applications. Which is good news for us all.

One topic not addressed in anything that I saw today is how GWT is going to fit into the AppEngine strategy.

Lombardi have created a SaaS diagramming tool (a sort of Visio for the web) called Blueprint using Google Web Toolkit (GWT). The application is written entirely in JavaScript generated by GWT.

0 comments: