为什么要选择Ext

来源:互联网 发布:淘宝咖啡店推荐 编辑:程序博客网 时间:2024/05/01 23:38

   学习AJAX的过程中 接触了ExtJS,历史上书说extjs是YUI-ext与jQuery的整合,官网对于Ext JS的解释是 Cross-Browser Rich Internet Application Framework ,跨浏览器的富客户端应用程序框架。

前些日子接触过jquery,很好的东东,社区对jquery的反应都很不错,20+k,短小精悍!

下面是一些Jquery 与 extjs的比较,认知各自优缺点,视具体需求应用。

1.JQuery 提供了方便的对网页元素操作方法,但不提供基本控件,如:Tab,   Grid,Muen 等,Extjs 是一套完整的控件库,Extjs 提供这些控件。

2.Extjs 对制作控件的方法就是使用div 画格子,这点类似 windows 基本控件使用的方法。所以说通过 js 完全可实现windows 界面;

3.Extjs 也提供JQuery 所包含的功能;

4.Extjs 库体积大,JQuery 体积小,这是因为JQuery 只提供了网页元素操作方法,不提供控件,不过如果你自己开发一套具有Extjs 这样完整的控件库,体积肯定不比Extjs 小;
5.Extjs 和 JQuery 的源代码都写得很好,很值得一看。

通过简单的对比和网上对ext的评价,我认为extjs替程序员做了大部分基础工作,以致部分人认为extjs的对程序员的灵活度太窄。extjs把mvc的视图和控制都封装的很全,而jquery 主要是封装了m(控制)这部分,所以包大小上肯定是有差距的。

ext现在有提供 自定制框架的bulid。可以取消不需要的功能,通过build you own extjs,extjs可以瘦身不少。 http://extjs.com/products/extjs/build

 

新的extjs 3.0 即将发布,extjs 会更轻量级,而且将会新增 图表API,不知道是否会增加客户端的压力。

期待!

 

Ext JS 3.0 (Early 2009)

All new lightweight, high-speed core base library
Flash Charting API
Ext.Direct - Remoting and data streaming/comet support
Integrated client-server data binding/marshaling of updates
ListView component
Enhanced Button and Toolbar components
ARIA/Section 508 accessibility improvements
CSS updates for reset style scoping and easier custom theming
Update the Ext event registration model
Ext.Ajax enhancements
Ext 2.1.0于2008年4月20日正式发布稳定版,双重授权由原来的LGPL和商业授权(包括2.0.2以及之前的版本),改为GPL3.0和商业授权(从2.1.0开始)。这也就意味着2.1.0这一版本开始,不能再以类库的形式引用Ext进行商业闭源开发了,必须开源(除非你花钱购买商业授权)

 

 

下面介绍ext ‘s another product ——GxT   Ext-GWT

通常先介绍下Gxt的背景,关注google code 的可能知道 GWT-  Google Web Toolkit,而gxt 也就是基于gwt 与ext 整合的产品

 

Ext GWT is a Java library for building rich internet applications with the Google Web Toolkit (GWT). It includes:

High performance, customizable UI widgets
Full theming support with standard CSS
Well designed, consistent and fully documented source code
Native GWT solution with no external JavaScript or 3rd party libraries
Full remote procedure support using GWT RPC, JSON, and XML
Support for Java 1.5 features, including generics, enums, and varargs
但感觉使用起来不是很方便。现在没有IDE 能很好的支持开发