ZK: What It Is

ZK is an event-driven, component-based framework to enable rich user interfaces for Web applications. ZK includes an AJAX-based event-driven engine, a rich set of XUL and XHTML components and a markup language called ZUML (ZK User Interface Markup Language).

With ZK, you represent your application in feature-rich XUL and XHTML components and manipulate them upon events triggered by user's activity, similar to what is done in desktop applications. Unlike most of other AJAX frameworks, as far as ZK is concerned, AJAX is a behind-the-scene technology. The synchronization of component content and the pipelining of events are done automatically by the ZK engine.

Your users get the same engaging interactivity and responsiveness of the desktop application, while your development retains the simplicity of developing desktop applications.

In addition to a simple model and rich components ZK also supports a markup language called ZUML. ZUML, like XHTML, enables developers to design user interfaces without programming. With XML namespaces, ZUML seamlessly integrates different set of tags[2] into the same page. Currently ZUML supports two set of tags, XUL and HTML.

For fast prototyping and customization ZUML allows developers to embed EL expressions, and scripting codes in your favorite languages including but not limited to: Java[3], JavaScript[4], Ruby[5] and Groovy[6]. Developers could choose not to embed any scripting codes at all if they prefer a more rigid discipline. Unlike JavaScript embedded in HTML, ZK executes all embedded scripting code on the server.

It is interesting to note that everything running at the server is from the viewpoint of the application developers. Component developers have to balance the interactivity and simplicity by deciding what tasks will done at the browser and what tasks will be done at the server.



[2] A tag is an XML element. When a ZUML page is interpreted, a corresponding component is created.

[3] The Java interpreter is based on BeanShell (http://www.beanshell.org).

[4] The JavaScript interpreter is based on Rhino (http://www.mozilla.org/rhino).

[5] The Ruby interpreter is based on JRuby (http://jruby.codehaus.org/).

[6] The Groovy interpreter is based on Groovy (http://groovy.codehaus.org/).