Book Image

ZK Developer's Guide

By : Jurgen Schumacher, Markus Stäuble
Book Image

ZK Developer's Guide

By: Jurgen Schumacher, Markus Stäuble

Overview of this book

<p><a href="http://www.packtpub.com/article/zk-developers-guide-table-of-contents"><br /></a></p>
Table of Contents (13 chapters)

Preface

ZK is an open-source web development framework that enables web applications to have the rich user experiences and low development costs that desktop applications have had for years. ZK includes an AJAX-based event-driven engine, rich sets of XML User Interface Language (XUL), and XHTML components, and a markup language (ZUML).The ZK rich client framework takes the so-called server-centric approach: the content synchronization of components and the event pipelining between clients and servers are automatically done by the engine and AJAX plumbing codes are completely transparent to web application developers. Therefore, the end users get rich user interfaces with similar engaged interactivity and responsiveness to that of desktop applications, while for programmers, development remains similar in simplicity to that of desktop applications

What This Book Covers

In Chapter 1 we give an introduction to, and take a look behind the ZK framework. In the last section of this chapter, we show some important issues from the ZK User Interface Language (ZUML).

In Chapter 2 we will implement a CRUD (Create—Read—Update—Delete) application. We will also design and implement the pages with the ZK framework.

At the beginning of Chapter 3, we start with a simple CRUD application. The first thing we do here is to add some AJAX features to the application (live data). Here, we will learn many cornerstones provided by the ZK framework, and that we only have to implement some interfaces to use these features. We will move the application from a mixed code approach to a Model-View-Controller Architecture.

Chapter 4 deals with the end of the third phase in the development of a CRUD application with the AJAX ZK framework. We start with a simple application, and extend it step by step. The application now has many features that you will need in other applications as well.

Chapter 5 introduces the advantages and disadvantages of ZK. Then we will see how to integrate ZK with the Spring Framework and also why it is useful to do so. We will then move on to Hibernate and JasperReport.

In Chapter 6 we will learn how to customize existing components. We have the ability to use styles that we know from HTML to change the layout of the components. Additionally we will see that it is possibile to build new components (macro components) on the basis of existing components. And, last but not least, in the last section of this chapter we will learn how to create a complete custom component that is based on a .dsp file.

Chapter 7 introduces zk-bench. Zk-bench is a very useful tool and it supports much more than just designing ZUL pages. It simplifies the development of web applications a lot and it's build around the ZK framework.

The Appendix A contains information about the configuration files, which are important in the context of a ZK application. You should use this appendix in conjunction with Chapter 1 to get a better understanding of how to configure your ZK application.

What You Need for This Book

The following is the list of software that you need to install and configure in order to start working with ZK:

  • ZK 2.3.0

  • Tomcat version 5.5.x (apache.tomcat.org)

  • The demo application from ZK 2.3.0 is a simple WAR file. Just copy the WAR file into the webapps directory of the tomcat installation.

  • Eclipse version 3.3

Who is This Book For?

This book is a Developer's Guide that steps you through the ZK framework with examples. It starts with installing and configuring ZK and takes you on to integrate it with other frameworks. By the time you are through the book you will be able to build an application on your own.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

There are three styles for code. Code words in text are shown as follows: "In the sample there is a class InitSample in a package sample used."

A block of code will be set as follows:

<zscript><!
[CDATA[
import sample.InitSample;
]]>
</zscript>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items will be made bold:

if (event.getValue().length() > 0 && event.getValue().trim()
.length() > 0)
{
buttonToSayHello.setVisible(true);
}
else
{
buttonToSayHello.setVisible(false);
}

New terms and important words are introduced in a bold-type font. Words that you see on the screen, in menus or dialog boxes for example, appear in our text like this: "When the user clicks on the button Start the thread, the thread starts doing the work asynchronously".

Note

Important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader Feedback

Feedback from our readers is always welcome. Let us know what you think about this book, what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply drop an email to , making sure to mention the book title in the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email .

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer Support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the Example Code for the Book

Visit http://www.packtpub.com/files/code/2004_Code.zip to directly downlad the example code.

The downloadable files contain instructions on how to use them.

Errata

Although we have taken every care to ensure the accuracy of our contents, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in text or code—we would be grateful if you would report this to us. By doing this you can save other readers from frustration, and help to improve subsequent versions of this book. If you find any errata, report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to the list of existing errata. The existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Questions

You can contact us at if you are having a problem with some aspect of the book, and we will do our best to address it.