View
4.122
Download
5
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
ZK Framework
OS Ajax Web framework for creating RIA’s
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
ZK Architecture
ZK demo
Supports EL, Java(script), Ruby, Groovy, Python Uses BeanShell Within zul file Within separate zscript file Within Java package
ZK scripting
Within Java package
<?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>
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");
}
}
ZK within Emergo
Emergo demo
Google maps demo
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