11 december 2008

Devoxx - day 2: GWT

The afternoon session of the second university day for me was about Google Web Toolkit, or, like these 2 frenchmen with their funny accent (franglais, like we say) call it: Jiwit (or something like that). If I'm not mistaking one of them already did a conference talk about GWT last year, together will Dick Wall.

This session was divided in 2 talks actually, the first and largest part, done by these 2 frenchmen dealt with the toolkit itself, focusing on the ease of use and ease to learn. The second part was meant as sort of a testimonials talk.

Apparantly it is very easy to learn GWT. The ease of development is achieved using well known concepts, especially for those who have been playing around with AWT/Swing and RMI before:

  • screens are written in Java, just like AWT/Swing screens are. With the right plugin, you can paint them and have the Java code generated.
  • the event handling of the widgets is done in a very AWT-like manner, using event listeners
  • remote calls require the definition of a "business" interface and a remote implementation, very much the way RMI works. Underyling this results in a servlet, being invoked by the Javascript on the frontend

You don't have to bother about writing Javascript. This is all generated for you, browser specific AND language specific. In other words: if you want to support IExplode, Firefox, Chrome, Safari and Opera in Dutch, English, French, German, Spanish, Italian and Spanish, this will result in 35 generated Javascript files... This Javascript code is "obfuscated": all code of a function on 1 single line, unrecognizable method, parameter and variable names, ...

The focus of GWT is on developing single screen applications. Statelessness is also the buzzword in this technology. Not the server but the frontend will keep track of the state. Now I had a bad experience with this type of applications on the Sun Rays of Devoxx's cyber café: inactivity timeout can be very annoying when you're in the middle of writing the blog post of your life... Apart from that, I have other remarks concerning single screen applications. This may result in building really big, fat client applications. The advantage of a "thin" client and broadband connections will dissolve. It will take more time too download these applications (that's another thing I experienced on these Sun Rays, while trying to update my blog: downloading the editor application took a lot of time; it felt like I was connected with a 56K modem over an analog telephone line). And since you're actually wrting Javacode, which is compiled into Javascript, you may start mingling business logic with presentation logic. You're moving business logic to a tier where it is not supposed to be. In other words: it is very easy to write really dirty code.

There are a few things for which I still haven't had an answer:

  • how to integrate existing HTML, CSS and Javascript in your code? Javascript is been touched very briefly, but not enough to have an idea how it works
  • Especially CSS and existing application code (even other servlets, etc): how to integrate these?
  • They demonstrated a plugin called GWTDesigner. This is a non-free plugin. How about free alternatives?

Conclusion: even though the concept looks really cool, I'm still reluctant to use GWT. Once you start with it, you're stuck with it...

08:17 Gepost door There's more to life than what you see through windows in Javapolis | Permalink | Commentaren (0) | Tags: devoxx08 |  Facebook |

De commentaren zijn gesloten.