Android 뉴스 
출품주제 2 - 웹 기반 안드로이드 개발 도구 (사례 : ZK Mobile)
작성일 2008-03-03 (월) 20:23
ㆍ추천: 0  ㆍ조회: 3404      
첨부#1 (778KB) (Down:319)

ZK Architecture Overview


Over a decade of evolution, Web applications evolved from static HTML pages, to Dynamic HTML
pages, to applets and Flash, and, finally, to Ajax technologies.

Challenges in Ajax

When providing the interactivity to fulfill user’s demand, Ajax increases the complexities of
applications and skill prerequisites to the already costly development of Web applications.
  • Incompatible and buggy JavaScript API among different browsers
  • Maintenance overhead to replicate business logic at the client, particular in a different
    programming language.
  • Danger of exposition of application data model and business logic to the client
  • Communication headache to maintain data consistency between the client and the
    server asynchronously

Current Solutions

In order to deliver a manageable Ajax solution, many frameworks or libraries have been
developed. The most straight forward way is to provide ready-to-use JavaScript components.
However, application developers have to manipulate these components, glue them with
business logic at the client, and develop an application-specific way to exchange data
with the server dynamically.
In short, only the first one of above challenges was addressed. The rest of challenges,
more or less, remain the hassles of application developers. Is it intrinsic to the development
of Web applications? Or the traditional Web application programming model is simply inadequate?

ZK Architecture

In response to these challenges, ZK delivers the intuitive desktop programming model to Web
applications with event-driven, component-based, and server-centric architecture. In addition,
ZK provides the modern development of UI technologies, such markup languages to design UI
without programming, scripting languages to change applications on fly, annotations and
data-binding to access databases and Web services without programming.
As depicted above, ZK is composed of Client Engine running at the browser, and the Update
Engine at the server. They act as pitcher and catcher. They work together to deliver events
happening in the browser to the application running at the server, and update the DOM tree at
the browser based on how components are manipulated by the application at the server.
At the heart, all your application codes are running at the server. Whatever events triggered by
users are automatically sent to your application running at the server. Whatever you alter
components running at the server are automatically updated to the visual representation at the
browser. The browser is only a presentation layer of applications, no data model, neither
business logic should be exposed on it.
Since the application is running at the server, it could access the backend resources directly, such as databases and Web services. There is no communication hassle or security concern to access them across the Internet.  
The best way to use Ajax is not to know its existence.

Execution Flow

  • ZK Client engine sits at the browser to detect any event triggered by user's activity
    such as moving mouse or changing a value. Once detected, it notifies Update Engine.
  • Upon receiving the request from Client Engine, Update Engine updates the content
    of corresponding component, if necessary. And then, Update Engine notifies the
    application by invoking the event handlers, if any.
  • If the application chooses to change content of components, remove, add or move
    components, Update Engine sends the new content of altered components to Client
    Engine. Then, Client Engine updates the DOM tree accordingly.
  • To minimize the traffic between the client and the server, multiple events are sent
    back to the server at once if they are deferrable.
  • To maximize the visual effect and responsiveness, ZK provides the so-called Client
    Side Action that you can execute, though optional, your own JavaScript codes at the client.

Win Android $10 Million Developer Challenge by ZK Mobile for Android ;-)

Dennis Chen, Engineer, Potix Corporation
Jeff Liu, Engineer, Potix Corporation
Nov. 14, 2007

Version & Requirement



On Nov 12th, 2007, Google releases Android SDK and a complete tutorial. Android, licensed
under the Apache license, is a fully integrated mobile platform of a Linux operating system,
middleware, widgets set and applications. Few features to be noticed:
  1. Android SDK can be run in Windows, OSX(Mac), Linux
  2. Develop in Java on Eclipse with its Eclipse plugin
  3. Emulator comes with SDK for debug and application development
  4. documentation and tutorial are complete and really helpfull

To learn more about Android, click here

ZK Mobile for Android

The ZK Mobile for Android is the ZK extension that enables reachness of ZK applications to
Android platform mobile devices with little programming. With the event-driven components
and a markup language on server side, developing is as simple as programming desktops
and authoring HTML. No Android prerequisite is required. The architecture of the ZK Mobile
Computing for Android is as follows,

Binding ZK and Android by Server-Centric Architecture

With ZK's server-centric architecture, developing Android application becomes a very easy
task. ZK mobile developers only need to write MIL (Mobile Interactive Language) files in ZK
tags without understanding Android SDK detailly. MIL is a markup language that enables
developers to author a page without programming. Also, due to the tendency of server-centric
framework - application runs on server, developers don't need to re-deploy applications
when applications update occurs and the business logic is controlled in server side. As
soon as the application installed at the server is upgraded, the user will access the most
updated version automatically. Moreover, the business logic is running at the server, so it
requires much less memory in the mobile device.

ZK with Android in Action

Next, we implement a twitter application to demonstrate how easy developing ZK Android
application can be.

Live Demo

Try It Yourself

  1. Installing Android SDK, refer to installing the SDK
  2. Installing the Android Eclipse Plugin (ADT), refer
    to Installing the Eclipse Plugin (ADT)
  3. Download twitter.war and deploy it to Tomcat and then start the Tomcat
  4. Download and extract it to a folder
  5. In Eclipse, click on 'File', select Import.../General/Existing Projects into Workspace.
    Hit the browse button, and navigate to where you placed the extracted folder, select
    zkgphone and click OK..
  6. Run zkgphone and use the url of the depoyed twitter application(EX: To run Android application in Eclipse,
    please refer to here


  1. twitter.war
덧글 쓰기 0
※ 회원등급 레벨 0 이상 읽기가 가능한 게시판입니다.