This page last changed on Jun 08, 2007 by amitku.

Xul/ZK Technology Test

Note: Because I was at a conference and the time was constrained, I did not do the implementation on my own. I worked with one of my programmers (Paras Mehta, B Sc. Computing Science, 3rd year Med student) on this project.

What it's Good For:

  • Creating classic web 2.0 interface applications
  • good text control (CSS)
  • java/js familiarity is somewhat transferable

What it's Not Good For:

  • docs are bad – documentation similar to OL (official is good but basic – read: not useful to us – and community is either young or inactive)
  • custom animation is hard – pushing the interface envelope is hard (custom animation on custom components relies on straight js--meaning there is little advantage in using the framework. In fact, some of the usual js methods are blocked by the framework)
  • accessing dynamic objects is difficult

Further Discussion:

The trouble with object reference:

If an element on the page (eg. a 'label') is given an ID, that ID can be referenced directly in the script. (eg. if the label has the id="myLabel", "myLabel" can be used within the script as a direct reference to the element.) In comparison, in Javascript one must explicitly call a function to get a reference to an element (eg. "document.getElementById('myLabel')".) While there are situations where the ZK approach simplifies programming, that approach confounds the programmer when they want to dynamically create elements, but still reference them in action scripts once they've been created. There was no documentation that made it clear how this was to be done.

– P. Mehta

The trouble with java-as-markup:

When element attributes in ZUML are set, Java looks for an existing "set" function. (eg. "<div width='100px'> will call Div.setWidth('100px')".) This means that custom attributes are not added in a manner logical for a markup language. "<div myAttribute='value'>...</div>" would not be allowed – it causes a runtime error when the function 'setMyAttribute' isn't found. Instead, one must use a cumbersome 'custom-attribute' construct: "<div><custom-attribute myAttribute="value />...</div>." While this isn't in and of itself a huge problem (once a developer figures out that this is the necessary construct), it betrays one of the limitations of the implementation of ZK: that we're translating from markup to Java. In the future, without more vision in the development of this translation tool, the capabilities of ZK may well be limited by the imagination of those programming the tool itself, rather than those using the tool to develop their own applications.

– P. Mehta

The Test App:

http://brain.lis.uiuc.edu:3030/zkdemo-all/monk/monk.zul

The only function that works is the zoom which doesn't animate. It is representative though and it could be animated when we figure animation out.

Matt Bouchard - June 7 / 2007

Document generated by Confluence on Apr 19, 2009 15:04