Eclipse RAP 2.2 (Rich Ajax Platform) 发布
Eclipse RAP (Rich Ajax Platform) 项目的目的是让开发人员能够利用Eclipse开发模型来构建Rich,Ajax-enabled Web应用程序。主要运用著名的Eclipse平台扩展点插件机制和一个包含SWT/JFace API的widget工具包。
1 基本概念
RAP可以让开发人员使用JAVA API和按照Eclipse 插件的开发模式构建基于AJAX的Web 2.0应用程序, RAP的工作原理是采用交叉编译的方式将Java 代码生成html、JavaScript和CSS文件,底层基于Qooxdoo AJAX框架,这样,我们就不必接触JavaScript、CSS和处理Http的细节了,可以让我们更关心程序的功能实现。2 与rcp的关系
RAP和RCP 一样,运行在Equinox框架上,Equinox是OSGI R4规范的实现,是一个非常优秀和成熟的OSGi框架,Eclipse 是通过这个框架实现灵活的扩展性和插件的热部署。RAP也支持Eclipse的大部分扩展点,其实RAP和RCP在架构上非常的类似,下图分别为RCP和 RAP的架构图
可以看出,这之间的整体架构差别不大,RCP是基于SWT的,RAP是基于RWT的,RWT是实现了SWT功能的一个子集。其实这之间的使用方式都差不多。比如RWT也能和SWT一样使用MVC的方式来创建表格。
Looking back on another eventful year for the RAP project, today we’re proud to publish the results in a new release, RAP 2.2. Let’s have a look at the highlights:
Client-side Scripting
We started off the work on RAP 2.2 with integrating the ClientScripting from the Incubator project into RWT. With this new feature, you can now attach scripted listeners to a widget. Those listeners are directly executed on the client, allowing for immediate feedback. This is particularly useful for validation of user input. You can see the difference in our online example.
Modernized ToolTips
In the second milestone, we focused on improving the user experience of tooltips in RWT. Tooltips can now point to the widget they annotate and are positioned relative to this widget, not to the mouse position.
The pointer images can be adjusted by new theming properties. In addition to the new look, we also fine-tuned the behavior of tooltips. They come up quicker and do not vanish until the mouse pointer is moved. Moreover, tooltips can now also contain markup:
Row Templates
SWT provides tree and table widgets to display data, but nothing that compares with styled lists known from mobile interfaces. We decided to make those modern UIs possible in RAP anyway. Instead of creating a custom widget with a new API, we came up with a template API that lets you change the item presentation of existing tree and table widgets. A row template applies to every row of a table and defines text and image cells that can be freely arranged.
With this API, you can re-use existing SWT and JFace code and just define a new presentation. This feature is also already available in the latest version of Tabris, our RAP-based platform for Android and iOS.
News from the RAP Incubator
The RAP Incubator project is a place where new features and add-ons for RAP are being developed. Two new components have been added recently that are worth mentioning. The Auto suggest component allows to attach type-ahead search to an existing text field
and the rich text editor for RAP is now also part of the RAP Incubator project.
Last but not least, the FileDialog has been polished and supports multi-file selection now.
Download
RAP 2.2 is available on the download page as p2 repositories and as zip files. The core libraries rwt, rwt.osgi, and rap.jface can also be found on Maven Central.
You can find a more detailed list of changes in the RAP 2.2 New and Noteworthy.
Thanks to the RAP committers and to all contributors who helped with this release by testing, discussing, and pointing out problems early. We wish you all a relaxing X-mas vacation and look forward to another great year with RAP. The next release will be RAP 2.3 in June 2014.