jQuery has just turned one year old and, to celebrate the matter, they have released version 1.1 to the world. Looking at the changes and improvements has me considering the situation in that other framework I’ve been working with of late — GWT. GWT has a tame little DOM class behind which it hides the messy browser discrepancies; still, it looks just like the document element with its getElementById and company.
What I want is the coding style of jQuery in GWT. I’d like to be able to write something like
// $("p").after("Hello");
jQuery.S("p").after("Hello");
Now one of the first things that people did with GWT was splice in libraries like Scriptaculous via JSNI. It was easy and ladled all sorts of neat effects into a GWT-based application. Why rewrite perfectly good Javascript libraries when they could be included with such ease? Well, as it turns out, there are more than a few reasons.
- Writing utility and effects libraries in the GWT allow the browser specific stuff to be handled where it belongs — in the GWT.
- Splicing in complicated and voluminous Javascript native code complicates testing and debugging. Rewriting the Javascript libraries in Java allows the whole sticky mess to be debugged and tested in hosted mode.
- The DOM class is pretty dull, just like the
documentelement. There is a reason why libraries like Prototype and jQuery came about with their compact chained-method style. It’s just a lot more efficient and snort-inducing fun to manipulate the DOM this way.
It might be a little bit difficult to really get a 1-1 port of something like jQuery, but it’s certainly worth a try. If I have time this week, I will have a look at both jQuery and Prototype/Scriptaculous and see which one is the easier one to tackle.

..or, you can just start coding in jQuery, Dietrich!
)
C’mon, you know you want to, LOL! ;o)
jquery definitely!