What's ZK"

From Documentation
 
(7 intermediate revisions by the same user not shown)
Line 5: Line 5:
  
 
==ZK: What It Is==
 
==ZK: What It Is==
ZK is an event-driven, component-based framework to enable rich user interfaces for Web applications. ZK includes an AJAX<ref>AJAX is coined by Jesse James Garrett in Ajax: A New Approach to Web Applications.</ref>-based event-driven engine, a rich component set of XUL and XHTML and a markup language called ZUML (ZK User Interface Markup Language).
 
  
===Similar to desktop applications===
+
ZK is an event-driven, component-based framework powering rich user interfaces for Web applications.
:With ZK, you represent your application's GUI in feature-rich XUL and XHTML components and manipulate them upon events triggered by user's activity. The synchronization of component content and the pipelining of events are done automatically by the ZK engine.
 
  
:Your users get the same engaging interactivity and responsiveness of the desktop application, while your development retains the simplicity of developing desktop applications.
+
Events triggered by an end user, by an application, by server push and even by message queues are stacked and handled using the same mechanism.
  
:ZK handles browser compatibility issues for developers. You don't have to write javascript to handle it anymore. Write once, run in every browser.
+
All UI components are simply POJOs, which developers can instantiate, manipulate and extend directly and straightforwardly.
  
===XML based GUI===
+
Notifications of events and synchronization of component's states are done automatically making Ajax communication and browser dependencies totally transparent to developers.
:ZK supports a markup language called ZUML. ZUML, like XHTML, enables developers to design user interfaces without programming. With XML namespaces, ZUML seamlessly integrates different set of tags<ref>A tag is an XML element. When a ZUML page is interpreted, a corresponding component is created.</ref> into the same page. Currently ZUML supports two set of tags, XUL and HTML.
 
  
=== Pure Java based GUI ===
+
In addition to pure JavaZK allows developers to design UI in a markup language called ZUML (ZK User Interface Markup Language), which is an enhanced version derived from XUL. ZUML supports EL expressions, declarative control, and many scripting languages, including Java ([http://www.beanshell.org BeanShell]), Groovy, Ruby, and more.
:ZK also allows developers to write UI in pure Java (so called Swing-style programming). All components are POJO. The creation, modification and removal are as straightforward as handling POJO objects. In additions, developers are allowed to mix the use of XML and Java to compose UI.
 
  
===ZK executes Java code on the server===
+
While most of ZK application's code, for best productivity and security, runs at the server, ZK's Server+Client Fusion architecture allows developers to optimize responsiveness and leveraging the client's computing power by distributing some of the application code to the client.
:You can write event handler of GUI component in Java. You can also write business logic in Java. All Java code, whether it is embedded in ZUML, or in Java class, is executed at server side. Therefore, you can access all backend servers as you are used to, and fully utilize any Java library as you like.
 
 
 
===ZK executes all embedded scripting code on the server===
 
:For fast prototyping and customization, ZUML allows developers to embed EL expressions, and scripting codes in your favorite languages including but not limited to: Java<ref>The Java interpreter is based on BeanShell (http://www.beanshell.org).</ref>, JavaScript<ref>The JavaScript interpreter is based on Rhino (http://www.mozilla.org/rhino).</ref>, Ruby<ref>The Ruby interpreter is based on JRuby (http://jruby.codehaus.org/).</ref> and Groovy<ref>The Groovy interpreter is based on Groovy (http://groovy.codehaus.org/).</ref>. It's easy to integrate other language interpreter. Then, developer can choose his favorite language. Developers could choose not to embed any scripting codes at all if they prefer a more rigid discipline.
 
  
 
==ZK: What It Is Not==
 
==ZK: What It Is Not==
=== Not assumption of Back-end ===
 
:ZK assumes nothing about back-end services, persistence or inter-sserver communication. ZK is designed to be as thin as possible, while providing MVC and the seamless integration. All of your favorite middleware technologies such as: JDBC, Hibernate, Spring, JSP, Java Mail, EJB or JMS work as they used to.
 
  
===No tunnel, RPC, RMI needed===
+
ZK assumes nothing about back-end services, persistence or inter-server communication. ZK is designed to be as thin as possible, while providing the seamless integration with other Java technologies. All of your favorite Java technologies such as JDBC, Hibernate, Spring, JSP, Java Mail, EJB or JMS work the same way as you are familiar with.
:ZK doesn't provide a tunnel, RPC, RMI or other API for developers to communicate between clients and servers. This is because all code runs at the server within the same JVM.
 
  
:If using client-side programming, developers could use jQuery or ZK AU requests to communicate with the server directly.
+
ZK doesn't provide RPC, RMI or other API for developers to communicate between clients and servers, since all code runs at the server<ref>Client-side programming could leverage jQuery's Ajax mechanism or ZK Update engine to synchronize with the server manually.</ref>.
  
===No obligate design pattern===
+
ZK doesn't enforce developers to use scripting, pure Java, markup languages, MVC or other design patterns, but providing them as options to satisfy the different skill set, methodologies, and demands that your team might have or be required to.
:ZK doesn't enforce developers to use MVC or other design patterns. Whether to use them is the developer's choice. Although ZK does provides good support for MVC pattern.
 
  
===Not limited to XUL===
+
ZK supports AJAX transparently but a ZK application is not limited to the scope of Ajax applications. With ZK Mobile and ZK Android, your applications could reach any devices not equipped with a modern browser.
:ZK is not a framework aiming to bring XUL to Web applications. It is aimed to bring the desktop programming model to Web applications. Currently, it supports XUL and XHTML, in future it might support XAML, XQuery and others.
 
  
===Not limited to Ajax===
+
<blockquote>
:ZK embeds AJAX in the current implementation but it doesn't end in where AJAX does. With ZK API for Mobile devices, your applications could reach any devices that support J2ME such as: PDA, mobiles and game consoles. Moreover, you don't need to modify your application at all<ref>For devices with small screen, you usually have to adjust the presentation pages.</ref>.
+
----
 
 
'''Notes'''
 
 
<references/>
 
<references/>
 
+
</blockquote>
== Quiz ==
 
#Where does ZK execute java code?
 
#ZK has a XML based GUI, what is its name?
 
#What script code does ZK support now?
 
#Where does ZK execute embedded script code? Server or client?
 
#Does ZK need tunnel or RMI? Why?
 
 
 
== Refernce ==
 
*[[Introduction_fork|Introduction of ZK]]
 
 
 
{{ZKDevelopersGuidePageFooter}}
 

Latest revision as of 09:47, 24 September 2010

Stop.png This documentation is for an older version of ZK. For the latest one, please click here.


Welcome to ZK, the simplest way to make Rich Web Applications. This chapter describes what ZK is and is not. You may skip this chapter if you prefer to familiarize yourself with the feature and functionality of ZK right away.

ZK: What It Is

ZK is an event-driven, component-based framework powering rich user interfaces for Web applications.

Events triggered by an end user, by an application, by server push and even by message queues are stacked and handled using the same mechanism.

All UI components are simply POJOs, which developers can instantiate, manipulate and extend directly and straightforwardly.

Notifications of events and synchronization of component's states are done automatically making Ajax communication and browser dependencies totally transparent to developers.

In addition to pure Java, ZK allows developers to design UI in a markup language called ZUML (ZK User Interface Markup Language), which is an enhanced version derived from XUL. ZUML supports EL expressions, declarative control, and many scripting languages, including Java (BeanShell), Groovy, Ruby, and more.

While most of ZK application's code, for best productivity and security, runs at the server, ZK's Server+Client Fusion architecture allows developers to optimize responsiveness and leveraging the client's computing power by distributing some of the application code to the client.

ZK: What It Is Not

ZK assumes nothing about back-end services, persistence or inter-server communication. ZK is designed to be as thin as possible, while providing the seamless integration with other Java technologies. All of your favorite Java technologies such as JDBC, Hibernate, Spring, JSP, Java Mail, EJB or JMS work the same way as you are familiar with.

ZK doesn't provide RPC, RMI or other API for developers to communicate between clients and servers, since all code runs at the server[1].

ZK doesn't enforce developers to use scripting, pure Java, markup languages, MVC or other design patterns, but providing them as options to satisfy the different skill set, methodologies, and demands that your team might have or be required to.

ZK supports AJAX transparently but a ZK application is not limited to the scope of Ajax applications. With ZK Mobile and ZK Android, your applications could reach any devices not equipped with a modern browser.


  1. Client-side programming could leverage jQuery's Ajax mechanism or ZK Update engine to synchronize with the server manually.