开发者

Is jQuery compatible with ExtJS?

I believe Ext.js was using jQuery, but I'm not sure. Does anyone know if there is full compatibility with 开发者_JS百科jQuery and Ext.js?


Ext.js is completely independent of jQuery and as such does not rely on jQuery in any way. Don't know what you mean by 'full compatibility' but you can use both on the same page as they don't interfere with each other.

As Ext.js doesn't use the $-function, you don't even have to do any special trickery to get them to work together, as is the case with using Prototype with jQuery, for example.


You should be able to find some answers on the jquery site where it talks about using jQuery with other libraries.

Hope this helps some.


For ExtJS 3 for example, you need to follow a given loading order for these libraries AND load the ExtJS jQuery adapter.

See http://www.extjs.com/learn/Ext_Getting_Started for details :

jQuery (1.1+)    jquery.js
jquery-plugins.js // required jQuery plugins
ext-jquery-adapter.js
ext-all.js (or your choice of files) 


I think jQuery (core) and ExtJS are very compatible. I prefer to start new projects using both; in fact, flot.js demands jQuery - and flot.js is very nice - so in nearly every project I use both jQuery and ExtJS. Go for it!

Though ExtJS has made strides in their DOM manipulation and traversal utilities (core), nothing beats the elegance of jQuery (core). However, I prefer ExtJS (UI) to jQuery UI; I find it is much more homogeneous (and capable) than jQuery UI.


Upto Extjs 3.XX, adapters were configurable. But Sencha (Ext4) onwards, there is no separate adapters, instead we have ExtCore.


No more other libraries

ExtJS used to be built on top of other libraries. With version 2 they had their own but still offered the possibility to use other libs. But not anymore with version 3. ExtJS core code is very very mature, very efficient and VERY tidy. If you ask me, their code is written a lot better than jQuery's but that's subjective.

Combine with jQuery with no tricks

Anyway. If you intend to use ExtJS but would like to use other libs as well you can still do that. But if you think that you'd rather use jQuery with ExtJS I suggest you don't do that, because your code will have many hacks to overcome differences. I would rather use just ExtJS. You'll like it and probably won't want to switch back anymore.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜