23.12.2012 Views

ZK Developer's Guide

ZK Developer's Guide

ZK Developer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Integration with<br />

Other Frameworks<br />

<strong>ZK</strong>'s biggest strength is its productivity. But it does have other advantages:<br />

•<br />

•<br />

•<br />

•<br />

<strong>ZK</strong> decouples the rendering logic from the presentation logic. That means<br />

with <strong>ZK</strong>, applications can be retargetted to devices other than the browser,<br />

such as the desktop or Swing or even a mobile device.<br />

Async update has always been an issue. With <strong>ZK</strong> the whole async update<br />

business can be abstracted into a timer component and it is very easy to do.<br />

However, you still have to pay attention to your server-side logic.<br />

<strong>ZK</strong>'s ZUML makes it easy to build complex UI component trees. It also<br />

shortens the edit—compile—test cycle for developers.<br />

<strong>ZK</strong> allows developers to keep their business logic on the server side.<br />

<strong>ZK</strong> is a great framework but the focus is on the GUI so other frameworks may be<br />

needed. This chapter discusses the integration of <strong>ZK</strong> with other frameworks so as to<br />

overcome these weaknesses. One of the most important frameworks is Spring. This<br />

is very often used together with Hibernate. As we will see, it is very easy to integrate<br />

<strong>ZK</strong> with other frameworks. Once it was difficult to use captchas but in the latest <strong>ZK</strong><br />

versions, <strong>ZK</strong> supports captchas natively.<br />

Integration with the Spring Framework<br />

Spring is one of the most complete lightweight containers, which provides<br />

centralized, automated configuration, and wiring of your application objects.<br />

It improves your application's testability and scalability by allowing software<br />

components to be first developed and tested in isolation, then scaled up for<br />

deployment in any environment. This approach is called the POJO (Plain Old Java<br />

Object) approach and is gaining popularity because of its flexibility.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!