Installation
Download ZK CE Version (LGPL)
http://www.zkoss.org/download/zk
Install ZK Studio (Eclipse Plugin)
http://www.zkoss.org/documentation/zkstudio
- Note that by default ZK Studio comes with the ZK EE Version (60 days Trial). You may change the build setting to the CE version later on.
Install Jetty (I prefer Jetty over Tomcat)
http://download.eclipse.org/jetty/
- I am using version 8 in my project.
Jetty WTP Plugin
http://wiki.eclipse.org/Jetty_WTP_Plugin/Jetty_WTP_Install
- You will need this in order to have the "Server Adapter" for Jetty version 7/8 configured in Eclipse.
- Preferences > Servers > Runtime Environments > Add...
Create Server Console
- Open the Servers window. Right click > New > Server
- To associate a project with the server (auto-deploy/synchronized), right click the server and choose [Add and Remove].
** 1. WTP Plugin has some bugs that it does not add all Jetty's JAR file to classpath. You may encounter ClassNotFoundException during the server start. You can manually add them back by double-click the server and choose [open launch configuration]. Then [Add External JARs] to the classpath.
Typically, it misses out these two jars:
- javax.annotation
- org.objectweb.asm
Dependency Management - Apache Ivy
- It is pretty easy to get start with Ivy. In eclipse, you can install the IvyDE plugin from the marketplace. Then create your own ivy.xml to specifiy the necessary dependencies.
- If you want to change the default Ivy setting, create ivysettings.xml and specify the properties to be changed according to the online reference.
- Both files can be put in the root directory of your eclipse project, and you can point to their locations in the IvyDE setting.
- You may want to have all dependencies (*.jar) to be exported to the WAR at your final deployment. Simply add this entry to your deployment setting.
Development
Basic Concepts
- Component is a visual element in ZUL, such as <button>, <label>...etc. This POJO represents the View of MVC pattern.
- Composer is interface that control the component, and so it is the Controller of MVC pattern.