Two weeks with the ZK framework

25 November, 2007

The ZK framework seemed to be a very compelling user interface solution when teamed with Grails. For those who don't know, ZK is an AJAX/XUL framework implemented in Java. It also has support for several scripting languages (Groovy, Ruby, and Python) in addition to Java to wire events and access components. The event-based model used by the framework sometimes is reminiscent of Swing.

Normally in a Grails application. your domain controller does most of the heavy lifting and both sends and receives data to/from the presentation layer. However, when using the ZK plugin, that doesn't seem to be possible. The controller can receive events but has no way to transmit objects back. Despite having static functions to do so, it seems that the ZK code is not in scope when trying to call it from the controller(NPEs abound). In a non-Grails application, I don't believe this issue would exist but our current framework within a framework configuration doesn't fancy it much. Given that I have less than two weeks until go live, I think I'm going to go with the less sexy route (GSP + CSS) and revisit the matter later. Echo2 does look interesting. The APIs appear to be easily targetable with a builder and the example code looks generally clean. I think an Grails-Echo2 application would need to shift most of the event handling code to the application instances and use the controller mainly for context switching. [I've looked at it for less than an hour, so it's not substantiated and ymmv].

On another note, for some reason, I'm really excited by the eee pc. I think it's because it's size makes it somewhat of a large PDA/ultra-mobile PC. It would be really cool to have lightweight Groovy apps running on an ultra-portable laptop. Unlike the XO-1, it runs a normal distro so besides space, getting Groovy to run would be a breeze.

Share/Save/Bookmark

Comments

Leave a comment