
Firstly, the GWT guys outlined the fundamentals behind their approach. It was interesting to see that their focus is on the end user experience, and for them that means speed and reliability. They are happy that they don’t have the most ‘gee whiz’ widgets if in any way they are not fast and cross browser compatible. To a certain extent, their compromise is to the ‘lowest common denominator’ however with the work they are putting in I am not sure that there are too many compromises. They are also big fans of static compilation. Not just because they like it, but because it allows them to better optimise the code produced. For them the optimisation allows even smaller downloads and faster execution.
The other interesting thing was their focus on the compilation process. For those that don’t know in GWT you write Java code (very Swing like) and the GWT compiler actually creates all the JavaScript you need. What I didn’t know is that it creates an include file specific for each browser and language in order to keep the client download size small. Also, in a recent release they have adopted a pretty funky image optimisation where all images in the view are merged into a single image. The code then ‘windows’ this large image to only show what it is supposed to. Why do this? Well according to them HTTP requests are expensive in terms of performance. By downloading one file once the browser is likely to cache this file well and subsequent visits or AJAX requests never have to download an image again. Sweet.
Another interesting point was their focus on testing. There is now a tool that allows the code to be deployed out to a number of machines and browsers to test performance.
They also talked up the changes in the last year, particularly in performance. Like the image compression above, they have done several other changes to create even more efficient code. They claimed performance improvements of between 30% and 80% over the same code of the year prior. Best part is that no changes were required in the application code, it was all achieved through better compilation techniques. Just get the latest version, re-compile and you are done! They think there is still ‘lots more low hanging fruit’, so it will be interesting to see how much faster it can be.
In their own words, they believe GWT is software engineering for AJAX. In the Java space it certainly seems like a compelling story and one well worth further investigation.
