views:

1160

answers:

5

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

+7  A: 

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.

Tatu Ulmanen
+2  A: 

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.

Chris
I agree, like the fact there is a JQuery adaptor to ExtJS (at least in ExtJS 2.3)
Jamie Love
+1  A: 

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.

Robert Koritnik
I love ExtJS, both I think the jQuery core code is much nicer than ExtJS. As far as UI is concerned, I agree with you - ExtJS is the nicest library around.
Upper Stage
If you think of modularity, classes, object orientation etc. jQuery doesn't use any object orientation and can't compete with ExtJS in any way shape or form. It may be faster, but ExtJS is definitelly more readable. So I could argu with you on this. :) But I won't...
Robert Koritnik
elaborate on the hack for jquery with extjs with a reference or example? Would love to see an example 'gotcha' to support your suggestion.
ericslaw
If you're going to extend ExtJS and jQuery functionality (because of whatever reason) your're going to hack things around. Because jQuery's plugins normally convert existing markup while ExtJS's usually generate new stuff. ExtJS also wraps DOM objects inside programming objects while jQuery works in a different way. Anyway. Think of a control you'll be creating using one lib and consuming its events in the other. Event objects would be different... What if you'll consume events using both libs? Cehcks and hacks I guess.
Robert Koritnik
I have used both libraries in concert - as you likely know, ExtJS provides an adapter for jQuery. I tend to avoid jQuery UI - perhaps this eliminates the need for the hacks to which you refer - but I find jQuery AJAX, CSS manipulation, and DOM traversal very handy even for components created with ExtJS.
Upper Stage
+1  A: 

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.

Upper Stage
A: 

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) 
Open SEO