Technology Guidelines"

From Documentation
m
m
Line 3: Line 3:
 
{{UnderConstruction}}
 
{{UnderConstruction}}
  
{{TOC limit|0}}
+
{{TOC limit|limit=1}}
  
 
=[[ZK Developer's Reference/MVC|MVC]] vs. [[ZK Developer's Reference/UI Composing/ZUML/Scripts in ZUML|Zscript]]=
 
=[[ZK Developer's Reference/MVC|MVC]] vs. [[ZK Developer's Reference/UI Composing/ZUML/Scripts in ZUML|Zscript]]=

Revision as of 01:49, 4 March 2011


Technology Guidelines


WarningTriangle-32x32.png This page is under construction, so we cannot guarantee the accuracy of the content!

MVC vs. Zscript

When to use MVC

MVC (Model-View-Control) is a design pattern that separates the model, view and controller clearly. It is easy to collaborate, develop and maintain. In addition, the performance is great. MVC is strongly suggested for development, especially for production systems.

When to use zscript

Zscript allows you to embed Java code in ZUML pages. It speeds up the design cycle, so it is suggested for prototyping, POC and testing. It is also good for exploiting ZK features and reporting bugs to ZK. However, Like any interpreter, the performance is not good, and tends to be error prone, so it is not suggested to use in production systems.

MVC Extractor

ZK Studio provides a tool called MVC Extractor that can convert zscript to MVC automatically. It simplifies to transfer the code from prototyping to production.

Documentation links

MVC:

Zscript:

Data Binding

When to use

Data Binding automates the data-copy plumbing code (CRUD) between UI components and the data source. It is strongly suggested whenever applicable, because it boosts the productivity a lot and the code is easy to read and maintain.

When not to use

Barely. However, it requires more knowledge to learn than EL expressions, so EL expressions is an alternative for people, such as UI designer, not familiar with ZK, especially in the UI design phase.

Documentation links

ZUML vs. Richlet vs JSP

When to use ZUML

ZUML is XML-based approach to declare UI. It does not require programming knowledge, and works well with MVC, Data Binding and others. It is strongly suggested unless you have different preferences (such as pure Java and JSP).

When to use Richlet

A richlet is a small Java program that composes a user interface in Java for serving user's request. You could use it if you prefer to compose UI in pure Java (like Swing).

When to use JSP

If you'd like to use ZK in legacy JSP pages, you could use one of following approaches:

  1. Use <jsp:include> to include a ZUL page.
  2. Use ZK JSP Tags in a JSP page directly.

Notice that ZUML support the use of HTML tags well (without JSP). For more information, please refer to ZK Developer's Reference: HTML Tags.

Documentation links

ZUML:

Richlet:

JSP:

Bookmarks vs. Multiple Pages

A traditional page-based Web framework forces developers split an applications into pages. On the other hand, Ajax (ZK) allows developers to group all functionality into a single desktop-like page.

When to use bookmarks (in single page)

When to use multiple pages

Documentation links

Bookmarks:

Multiple Pages:

Native vs. HTML Components

When to use native

When to use HTML

Documentation links

Event Processing Thread

When to use

When not to use

Documentation links

Version History

Last Update : 2011/03/04


Version Date Content
     


Last Update : 2011/03/04

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.