ZK framework

4,989 views

Published on

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

Published in: Education, Technology
  • Be the first to comment

ZK framework

  1. 1. ZK Framework OS Ajax Web framework for creating RIA’s
  2. 2. Why ZK? - Web based, cross browser - Java OS - Active and large community - New releases every two months - 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
  3. 3. ZK Architecture
  4. 4. ZK demo
  5. 5. ZK scripting - Supports EL, Java(script), Ruby, Groovy, Python - Uses BeanShell - Within zul file - Within separate zscript file - Within Java package
  6. 6. ZK scripting in zul file <?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"> 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>
  7. 7. ZK scripting in zscript file 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"); } }
  8. 8. ZK within Emergo
  9. 9. Emergo demo
  10. 10. Google maps demo
  11. 11. ZK (dis)advantages - Extensive set UI components - Quick prototyping using script - Script as well as pure Java - Script to Java if to slow - Synchronisation client/server - Scripting (BeanShell) to slow for complex pages - Changing default style sheet not easy

×