Before you start
The aim of this tutorial is to develop a rich sample application using the ZK framework and an Informix database. ZK is an open-source Ajax framework which facilitates the creation of Ajax-driven websites using Java. Developers can make use of ZK's event-driven framework and markup languages to create powerful applications quickly and effectively.
Before you begin, ensure that done the following:
- You have installed a servlet container, for example Apache Tomcat in the Resources section.
- You have installed ZK. The link to download ZK is located in the Resources section of this tutorial.
- You have installed the JDBC driver for Informix. Check the Resources section for the link.
- You have installed Informix 11.50 or later. The Resources section includes a link for downloading a trial or free version of Informix. This tutorial was developed using Informix 11.50.TC4 Developer Edition.
This application follows the model-view-controller (MVC) architectural pattern, separating business logic from the user interface, enabling separation of user interfaces (contained in zul files) from Java business logic. This separation of concerns leads to cleaner and more maintainable code.
Refer to the Download section of this tutorial for a link to the ZK-Informix-Article-src.zip file that contains numerous files. The following list categorizes these files with respect to the MVC pattern:
- Model: Department.java, Employee.java, EmployeesDAO.java, DepartmentDAO.java, BaseDAO.java, DatabaseInformation.java, QuerySet.java, EmployeeQuerySet.java, DepartmentQuerySet.java, SqlPropertyLoader.java
- View: main.zul, employees.zul, departments.zul
- Controller: DatabaseSetupController.java, DepartmentController.java, EmployeeController.java, MainController.java
Note that the file DatabaseInformation.java contains all the settings that the application will use when accessing the database. If you choose you can manually change the settings of this file, and then access main.zul.