Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Integrate the rich Internet application framework ZK with Informix to build real-world applications

Rapid web application development for Informix

Timothy Clare (timothyclare@zkoss.org), Technology Evangelist, Potix Corp.
Photo of author Timothy Clare
Timothy Clare is a Technology Evangelist for the Potix Corporation which produces the ZK Framework. He has been working with various web and mobile technologies for over 10 years.
Sachin K Mahajan , Consultant, IBM  
Sachin Mahajan photo
Sachin Mahajan graduated with a Masters degree from University of Utah, Salt Lake City, Utah. He has worked in small and large-sized companies in the U.S. and India performing various technical and managerial roles.

Summary:  This tutorial presents a real-world example that integrates IBM® Informix® and ZK, a rich Internet application (RIA) framework. Informix is a flagship IBM RDBMS product, while ZK is a Java-based web application framework supporting Ajax applications. This event-driven framework enables creation of rich user interfaces with minimal knowledge and use of JavaScript. ZK's unique server-centric approach enables synchronization of components and events across the client and server via the core engine.

Date:  18 Aug 2011
Level:  Intermediate PDF:  A4 and Letter (111 KB | 28 pages)Get Adobe® Reader®

Activity:  45940 views
Comments:  

Before you start

Introduction

ZK is analogous to Ajax without JavaScript. It is a powerful framework composed of an Ajax-based event-driven engine, a rich set of XHTML and XUL components, and a markup language called ZUML for the purpose of creating feature-rich user interfaces. For a detailed example of the power of ZK and a real life example, see a link to the article Rich Internet applications using ZK in the Resources section.

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.


Prerequisites

This tutorial will guide you through every step of the process and is aimed at new users of ZK. Although no JavaScript experience is required, users should have some experience with Java before starting.

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.

ZK application design

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.

1 of 9 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management, Open source, Web development, Java technology
ArticleID=752700
TutorialTitle=Integrate the rich Internet application framework ZK with Informix to build real-world applications
publish-date=08182011
author1-email=timothyclare@zkoss.org
author1-email-cc=
author2-email=sachin.mahajan@in.ibm.com
author2-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.