Ushanka

Wednesday, February 6, 2008

Google Web Toolkit: a quick look

While writing the last blog post, I had a miserable time trying to get the Java snippets formatted correctly. I suppose the problem is that I'm using Blogger instead of a full-blown publishing platform like Movable Type which has plugins for code highlighting. Once I got the post up, I decided to build a web service that would take a code snippet in your language of choice and return highlighted HTML code.

Along the way, I found a neat package called GeSHi, a generic code highlighter that would make my life a lot easier. I then got the idea of making an AJAXed front-end to that along with other useful web services... Eventually, I came across the Google Web Toolkit and it looks like the Google folks are really on to something!

Now, I'm sorry to say that I've done my share of AJAX code before, both client side and server side, and it has been one of the most painful coding experiences of my life. The runtime errors, the lack of decent developer tools, the browser incompatibilites, the ridiculous workarounds... web development has been just one enormous nightmare. The guys and gals at Google managed to take a large part of that away with GWT; they're actually compiling Java code to JavaScript with all of the compile-time checks (hooray, no more typo-bugs rearing their heads at runtime!), development tools (including a debugger!), and patterns kept intact! The really nice bit is that they abstract all of the cross-browser differences via their core library. Now this is a step in the right direction for web development!

Of course, it's not a perfect system. They're building this on top of Java 1.4 so we still don't have safe container classes or enumerated values (sigh). What's more, since AJAX is event driven by nature, I think it would be so much easier to use a functional source language so we can pass functions and closures around instead of anonymous inner classes.

Labels: , ,

0 Comments:

Post a Comment



Links to this post:

Create a Link

<< Home