Wednesday, May 21, 2008

ZK Roadmap 2008

First of all, I'd like to thank all of you for your continuous enthusiasm about ZK. Without your support, ZK won't be able to accomplish the wonderful achievements ever. Only within two years, ZK has accumulated over half a million downloads. The list of customers, ranging from small to Fortune 500 companies, is growing fast. The deployment of ZK is moving from pioneer projects to the de facto standard for rich Internet applications in many companies.

首先,我要感谢所有对ZK一直满怀热忱的你们。没有你们的支持,ZK不可能取得到今天为止如此令人惊奇的成就。仅仅两年间,ZK已经累计有超过50万以上的下载了。我们的用户列表中,从小公司到财富500强企业,一直在快速地增加。在很多公司中,ZK的部署也从一些是实验性项目转变成实际的RIA(Rich Internet Application)标准。

The most important of all is that tens of thousands developers are enjoying the power of "Simply Rich." Developing a rich Internet application can be and shall be easier than developing a desktop application. ZK is not yet another Ajax framework. Rather, a new generation of Web application development.

在所有这一切中最重要的是,成千上万的开发人员正在享受着“Simple Rich”的强大能量。开发一个RIA可以被、也应该比开发一个桌面应用更为简单。ZK仍然不是一个新的Ajax框架。而是Web应用开发的新一代。

It is our driving force to carry ZK to a higher level. Here I'd like to share the new development of ZK in 2008 with you. Your feedback is highly appreciated.

这是我们的力量使得ZK得以走得更远。在这里我给大家分享一下ZK在2008年新的开发计划。深切期待您的反馈。


Simple

简单


Year 2007 was a busy year for us to deliver new concepts to simplify the Ajax application development, such as fulfill on demand, event forwarding and MVC by composer. In 2008, we will emphasize more on providing more documents and better integration with the development tools.

2007年对我们来说是一个繁忙的一年,我们提出了一个简化Ajax应用开发的新概念,例如完成按需情况、事件传递以及通过调节器(Composer)实现的MVC。在2008年,我们将会更多地强调提供更多的文档,以及与开发工具更好地继承。

Documentation

文档


The long-awaiting Style Reference Guide and Component Development Guide will be published in 2008. Style Reference Guide will demostrate how to customize the look and feel for each component with pure CSS. Component Development Guide will describe how to implement a component either from scratch or by wrapping a third-party widget.

等待已久的风格参考指南和组件开发指南将会在2008年发布。风格参考指南将会示范如何通过纯粹的CSS为每个组件客户化其外观(Look and feel)。组件开发指南将会描述从零开始、或者从封装第三方widget的方式实现一个组件。

In addition, we will keep exploring new concepts and new ways to apply features through small talks. For example, many of application-specific features can be done by use of annotations, such as multilingual and Web service integration.

另外,我们将继续探索新的概念和方式,通过小型的对话来应用功能特性。例如,许多应用特有的功能可以通过使用注解(Annotation)来完成,例如多语言的和web service集成。

Development Tools

开发工具


Cooperating with the third parties is still our main approach to provide the better integration with the development tools. For example, REM for NetBeans, and Zero Kode, zk-bench, and eZing Builder for Eclipse.

与第三方合作,仍然是我们提供与开发工具更好地集成的主要方法。例如,针对NetBeans的REM,以及针对Eclipse的Zero Kode,zk-bench和eZing Builder。

In 2008, we are going to take a step further. First, we will provide an Eclipse plugin to simplify the creation of ZK applications and ZUML files, and to provide better integration with Zero Kode. Many of them shall be done with no more than a few mouse clicks.

在2008年,我们打算走得更远。首先,我们将会提供一个Eclipse插件,用来简化ZK应用以及ZUML文件的创建,同时提供与Zero Kode更好的集成。很多的这类操作将会通过不多的几次鼠标点击就能完成。

Second, we will explore the possibility of translating UML into ZUML automatically by providing a plugin for, say, Umbrello UML Modeller and/or Rational Rose.

其次,我们将会探索通过提供一个插件,类似于Umbrello UML Modeller和/或Rational Rose,将UML自动转换成ZUML。

Rich

丰富


ZK is one of the most complete frameworks delivering versatile rich user experiences. But, we don't stop, and instead, we will keep providing more components and more richness, The most notables are ZK Spreadsheet, more third-party components, and 508 compliance.

ZK是能够提供多元化的丰富用户体验的最完整框架的一员。但是,我们不会止步不前,反之,我们会持续地提供更多的组件以及更丰富、最显著的ZK电子表格,更多第三方组件,以及对修复法案508(译者注:在 1998 年,美国政府通过了 Section 508 of the Rehabilitation Act,要求联邦机构的电子信息对于残疾人是可访问的。这一法案提供了软件应用 程序、Web 应用程序以及电信产品和视频产品的可访问性准则。不仅要求联邦机构实施可访问性准则,而且还要求签约为联邦政府工作的私人公司也要做到这一 点)的支持。

ZK Spreadsheet

ZK电子表格


ZK Spreadsheet is one of the most important development in 2008. Unlike Microsoft Excel, it is Web-based. Unlike Google Spreadsheets, it has a neat and powerful Java API that is 100% controllable and customizable. You can embed any number of ZK spreadsheets into your Web page(s). Best of all, it is open source.

ZK 电子表格在2008年是最重要的开发内容之一。不像微软的Excel,它是基于web的。不像Google的电子表格,它有一个简洁而强大的Java API,100%可控并可客户化。你可以在你的网页中嵌入任意数量的ZK电子表格。而最美好之处就是,它是开源的。

Third-party Components

第三方组件


In 2008, we will keep cooperating with contributors to integrate more components from third parties, such as Ext-JS, Codepress, and SMILE.

在2008年,我们将与贡献者们一起,从例如Ext-JS,Codepress和SMILE这些第三方那里,集成更多的组件。

508 Compliance

符合508法案

We had some progress in 508 compliance in 2007. However, it's still a long way to go. We will keep improving the accessibility of ZK in 2008.

我们在2007年已经在符合508法案上有了一些进展。然而,我们还有很长一段路要走。在2008年我们仍将持续改善ZK的易访问性。

Extensible

可扩展的


To work better with existent applications, to integrate seamlessly with other frameworks and to reach more devices, we introduced ZK JSP Tags, ZK JSF Components, ZK Seam, ZK Seasar, native namespaces, XML output, pluggable script interpreters, pluggable expression evaluators, and ZK Mobile in 2007.

为了更好地与现有应用一起使用,为了集成与其他框架的无缝结合并能够支持更多的设备,在2007年里,我们引入了ZK JSP Tags,ZK JSF组件,ZK Seam,ZK Seasar,native namespaces,XML输出,可插入脚本拦截器,可插入表达式计算程序以及ZK Mobile。

In 2008, we will keep delivering updates to these extensions, and explore the best practice to work with them. In addition, we will keep on enabling your ZK applications to reach as many and various clients as possible.

在2008年,我们将继续对这些扩展做进一步的更新,同时探索能够更好地与它们一起使用的最佳实践。另外,我们将会继续继续努力使ZK应用能够用到尽可能多的各种客户端上。

Flash, AIR and Android

Like ZK Mobile, we will keep pushing your ZK applications to reach as many and versatile clients as possible, such as Flash player, AIR and Android. In addition, we'd like to explore the possibility of using, say, Flash CS3 to design a ZK page. It is interesting to see the chemistry that can be achieved by combining the simplicity of ZK's server-centric architecture with the versatile functionality of rich clients.

类似于ZK Mobile,我们将会继续使你的ZK应用能尽可能多地用在各种客户端里,例如Flash播放器,AIR和Android。另外,我们还想探索使用例如Flash CS3这类工具来设计ZK页面的可能性。能够看到联合ZK以server为中心的架构的简单性和富客户端的多样性之后产生的效果,这一定是件非常有趣的事。

Integration with Other Frameworks

与其他框架的集成


We will upgrade the support of JSF from 1.1 to 1.2, and Seam from 1.2 to 2.0. We will also provide more utilities for variant frameworks, such as JPA, BMP, and Web services.

我们将对JSF的支持从1.1升级到1.2,对Seam的支持从1.2到2.0。我们还将对不同框架,例如JPA,BMP以及Web服务等,提供更多的工具。

Scripting Languages

脚本语言


With the help of contributors, ZK has supported the most mainstream scripting language: Java (BeanShell), JavaScript (Rhino), Ruby (JRuby), Groovy (and Grails), and Python (Jython) in 2007.

通过贡献者的努力,在2007年ZK已经支持了最主流的脚步语言:Java (BeanShell), JavaScript (Rhino), Ruby (JRuby), Groovy (and Grails), 以及 Python (Jython)

In 2008, we'd like to explore the best practice to use ZK with the scripting languages -- particularly, how to boost the productivity of developing a rich Internet application with a dynamic programming language.

在2008年,我们希望能探索出一些ZK与脚本语言一起使用的最佳实践 -- 特别是,如何采用一种动态编程语言一起,提升开发RIA的生产力。

Community

社区


An open-source community is all about collaboration. ZK started with a superior architecture that is easy to extend, and with a friendly community who loves to share. We saw a lot of collaboration among the ZK community, such as contributing codes, translating messages, submitting articles, suggesting features, reporting bugs, and answering questions in 2007. In 2008, we will enhance the website to encourage collaboration further. For example, the forum will be renewed with ZK Forum.

对于一个开源社区来说,所有的一切都是关于协作。ZK以一个易于扩展的、优越的架构,和一个友好的、大家喜欢分享的社区开始。在2007年里,我们在ZK社区中看到了很多的协作,例如贡献代码,翻译信息,提交文章,建议功能特性,报告bugs,以及回答问题。在2008年,我们会改善我们的网站,鼓励更进一步的协作。例如,论坛将会使用ZK Forum更新。

Wish you a prosperous 2008 and enjoy "Simply Rich" of ZK!
祝愿你又一个顺利的2008,同时能够尽兴于Zk的“Simple Rick”中。
Yours Sincerely,
顺颂商祺!

Tom M. Yeh
Founder, ZK
ZK创始人

Disclaimer: This roadmap is for information only and represents current view of ZK product direction. None of the information should be interpreted as a commitment on the part of Potix Corporation. POTIX MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT.

声明:这个roadmap只代表了当前ZK产品方向提供一些信息。这些信息并不应该被理解为这将会是Potix公司的承诺。POTIX在这份文档里没有做出任何的明确的或隐含的保证。

Monday, May 5, 2008

Ajax framework ZK series for Chinese developers

Recently I have some chances to use Ajax in my project, I will use this chance to translate some articles of ZK framework to Chinese and publish to my Chinese Blog

ZK Architecture Overview/ZK架构一览

ZK Architecture Overview Chinese Edition

Architecture Overview

ZK架构一览

Prefix

前言

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.

经过这十几年的发展演变,Web应用从静态的HTML页面演化成动态HTML页面,然后是Applet和Flash,最终到了Ajax技术。

Challenges in Ajax

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.

在满足用户需求而提供的交互性活动时,Ajax增加了应用的复杂度和本就费用高昂的web应用开发所必需的技能。

  • Incompatible and buggy JavaScript API among different browsers
  • 在不同浏览器间不可共存且容易产生bug的Javascript API
  • 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.

为了提供一个可管理的Ajax解决方案,目前已经有许多的框架或者类库。最直接的方式是提供立即可用的Javascript控件。然而,应用程序开发人员必须生成这些控件,在客户端中加入业务逻辑,并且开发一个应用特定的方式来与服务器端交互数据。

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?

简而言之,这里只解决了前面提到过的Ajax面临的挑战中的第一个。其他的挑战,或多或少还是会继续不断地骚扰我们的应用开发人员。难道这就是Web应用程序开发的本质么?或者只是传统的Web应用编程模型已经不适用了呢?

ZK Architecture

ZK架构

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.

为了解决这些挑战,ZK给Web应用提供了桌面应用编程模型天生就具备的事件驱动、基于组件以及以服务器为中心的架构。此外,ZK提供了当前流行的UI开发技术,例如通过标志语言而不是编程来设计UI,通过脚本语言动态地改变应用,不需要编程就可以访问数据库和Web服务的注解和数据绑定。

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.

正如上图所描述的,ZK是由运行在浏览器上的客户端引擎组成的,而更新引擎则位于服务端。他们就像是棒球里的投手和捕手。他们一起配合,将浏览器上发生的事件提交给运行在服务器端的应用,同时根据如何在服务器端生成组件的方式,来更新浏览器的DOM树。

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.

因为应用程序是运行在服务器端,所以它可以直接地访问后端的资源,例如数据库或者Web服务。在Internet上访问它们时毫无通信上的麻烦和安全隐患。

The best way to use Ajax is not to know its existence.

在不知道其存在的时候,才使用Ajax最好的方式

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.
  • ZK客户端引用位于浏览器中,用于查探任何有用户活动驱动的事件,例如鼠标的移动或者修改了某个值。一旦探测到事件,它便会通知ZK更新引擎。
  • 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.
  • 从客户端引擎接收到请求后,如果必要,ZK更新引擎便会更新对应组件的内容。然后,如果有事件处理器,更新引擎就会通过他们来通知应用。
  • 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.
  • 如果应用选择改变组件的内容,删除、增加或者移动了组件,更新引擎将会发送新的、改变了的组件到客户端引擎上。然后,客户端引擎便会相应地更新DOM树。
Note:
注意:
  • 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.
  • 为了最大化视觉效果和响应能力,ZK提供了一个所谓的客户端动作,让你可以(可选的)在客户端执行你拥有的Javascript代码。
SourceForge.net