Introducing 

Prezi AI.

Your new presentation assistant.

Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.

Loading…
Transcript

(there are many different ways to develop ZK applications... this is just a few...)

Client

There are a lot of different ways to achieve the same goal in ZK

GWT

ExtJS

open source with support

A good product is one that doesn't actively need support

but instead is there to help save time and create custom features

ease of use

Why we chose ZK

VERDICT: yes... and within a week...

so what is the ZK Framework?

and what does it look like?

richard holland

technical lead - IT

LANGUAGES

THE TEST: could an undergraduate intern develop the UI for an entirely

new module for our largest Java application entirely on his/her own?

ZK Framework

<XML/>

An enjoyable RIA Ajax web framework

Javascript

Grails

Ruby

Python

ARCHITECTURE

WALKTHROUGH OF WIDGETS

TOP FEATURES

open source

1.3 million downloads

over 200 widgets

and more 3rd party addons

security protection built in

cross-site scripting, Spring Security and more

multi-threaded ajax

taken care of automatically

jQuery friendly

interact with widgets from jQuery

Java framework friendly

Spring, Seam, JSF, LifeRay and more

as a Java developer how do I do that?

STEP 1

install the ZK Studio Eclipse plugin

http://studioupdate.zkoss.org/studio/update

looks good

wikis

How Tos

developer guides

active forums

the documentation

small talks

ZUL files

the xml files used to layout widgets

to get this...

the ZUL looks like this...

ZScript

fast to do and no need to compile

multi-language supported server code in a ZUL file

but not recommended...

keep server code out of ZULs

we do not use this

understanding the pieces

its not enough to be a good framework it must also be a popular one

an active community and active performance updates

active and popular

STEP 2

style guides

ZUL

Java

Autowire Composers

automatically inject ZUL widgets as Java objects on the Server

ZUL

Renderers

component reference

Server

Render widgets and their layout in Java

Java

Using the ZK Studio

STEP 3

We are going to focus on how we use ZK at Dreamworks

And a few tips & tricks

no use of zscripts

How we use ZK

Spring beans created for each ZK controller

ZK Controller (MVC) extends GenericAutowireComposer

ZUL begins with DelegatingVariableResolver to resolve Spring beans

ZUL widgets can now call Spring beans directly

ZK Spring library is used for all MVC binding

And that's all that is needed...

Session listeners

Listeners for anytime a new HTTP session is created or destroyed

Clicking too fast

Prevent users from resubmiting too fast

Using ZK.xml

simply implement SessionInit or SessionCleanup respectively

300 is the amount of milliseconds between submits

located within WEB-INF

disable-behind-modal will stop clicks if the screen is grayed out

Upload size

Do double check your max upload size

a size of -1 is unlimited

VS...

Java isn't friendly for Python/C++ devs (XML is)

and sometimes they can help us out with ZULs

Too much code required to get the same task done

We don't get a lot of time and any tool that saves time is a plus

Plain DHTML/CSS/JS

jQuery

JSF

JSP

Not as friendly with others as ZK... ZK plays nice with:

Seam

GWT (5 Files, 190 Lines of Code)

Client Side Files:

1. Map.java – The main application class

2. LocationGenerator.java – The interface for RPC.

3. LocationGeneratorAsync.java- The interface for RPC.

4. LocatorData.java – The data wrapper class for passing data from server.

Server Side Files:

5. LocationGeneratorImpl.java – The data provider class in server side.

ZK (2 files, 25 Lines of Code)

Client Side Files:

1: Gmap.zul - layout for application

Server Side Files:

2: GmapController - Sets new location for map

DWR

Spring WebFlow

Flash

HTML5 Canvas

Found that getting backend Java developers started with ZUL/XML to create UI and then transitioning to the Java API required less developer downtime than asking them to start with an unfamilar Java API for UI.

JavaScript version (ExtJS)

JavaScript gurus only

everything is layed out and developed in JavaScript...

Too extreme in both directions

don't like the license

learn GWT + ExtJS APIs

learn all of the intricacies of their relationship

Java version (ExtJS/GWT)

Thank you

Extra Features

Learn more about creating dynamic, engaging presentations with Prezi