11
ZK Framework OS Ajax Web framework for creating RIA’s

ZK framework

Embed Size (px)

DESCRIPTION

A presentation and demo of OS ZK framework and how it used within EMERGO, a method and toolkit for developing educational online games.

Citation preview

Page 1: ZK framework

ZK Framework

OS Ajax Web framework for creating RIA’s

Page 2: ZK framework

­ Web based, cross browser­ Java OS­ Active and large community­ New releases every two months­ Easy to learn

Why ZK?

­ Easy to learn­ Uses Ajax for synchronisation client/server­ Desktop metaphore within browser­ Event driven model­ Component based­ Uses XML user interface markup language (XUL)­ Integration with Spring/Hibernate

Page 3: ZK framework

ZK Architecture

Page 4: ZK framework

ZK demo

Page 5: ZK framework

­ Supports EL, Java(script), Ruby, Groovy, Python­ Uses BeanShell­ Within zul file­ Within separate zscript file­ Within Java package

ZK scripting

­ Within Java package

Page 6: ZK framework

<?xml version="1.0" encoding="UTF-8"?>

<?init zscript="login.zs"?>

<zk>

<button label="${c:l('login.form.button.login')} onClick="MessageBox.show("Message");"/>

<button label="${c:l('login.form.button.login')}">

<attribute name="onClick">

ZK scripting in zul file

<attribute name="onClick">

Executions.getCurrent().sendRedirect(“show_roles.zul");

</attribute>

</button>

<button use="CLoginBtn" label="${c:l('login.form.button.login')}"/>

<button use="nl.surf.emergo.control.CLoginBtn" label="${c:l('login.form.button.login')}"/>

</zk>

Page 7: ZK framework

import org.zkoss.zul.Button;

import org.zkoss.zk.ui.Executions;

public class CLoginBtn extends Button {

public void onClick() {

Executions.getCurrent().sendRedirect(“show_roles.zul");

ZK scripting in zscript file

Executions.getCurrent().sendRedirect(“show_roles.zul");

}

}

Page 8: ZK framework

ZK within Emergo

Page 9: ZK framework

Emergo demo

Page 10: ZK framework

Google maps demo

Page 11: ZK framework

­ Extensive set UI components­ Quick prototyping using script­ Script as well as pure Java­ Script to Java if to slow­ Synchronisation client/server

ZK (dis)advantages

­ Synchronisation client/server

­ Scripting (BeanShell) to slow for complex pages­ Changing default style sheet not easy