27

In one of my project someone has recommended me to use extjs. I know very little about extjs. I have done my all the project using jQuery. I know many of you know about extjs very well.

please tell me the pros and cons of using extjs?

Anoop
  • 23,044
  • 10
  • 62
  • 76
  • 2
    If you want to expand your horizons than I would recommend learning ExtJS. If you are pressed for time and are very efficient with JQuery than stick with it for time being. However client side MVC frameworks for RIA apps are the NOW and the near future whether it's ExtJS or Sproutcore or Backbone or whatever. – dbrin Nov 14 '11 at 07:34
  • @DmitryB, What is wrong new-bees getting answers from experienced devs? If people are ready to answer then why do you have problem with it? – SunnyShah Oct 17 '12 at 15:35

3 Answers3

26

Following are some of the major pros and cons of ExtJS:

Pros

  1. ExtJS is like a superset of the widgets like simple label, textBox buttons to complex grids, drag-drop panel s etc. It also provides demo for remoting to invoke remote server methods.

  2. It has quite good documentation with tutorials, samples and user community.

  3. Active and currently most adopted javascript RIA framework

  4. Good code quality/readability

  5. Amazing set of widgets, does everything we could possibly want. Seems quick, every version brings new improvements.

Cons

  1. Footprint - The library is 500 KB in size (using mod_gzip could be reduced to 150KB). Loading time would is high for home page on web.

  2. CSS – very easy to get lost. It is difficult to find correct class names

  3. HTML – full of divs and overly complex generated code. Difficult to debug even with FireBug.

  4. Modified GPL 3.0 licensed. Free for open source applications but paid for commercial closed source applications.

  5. Using ExtJs leads us to believe that the GUI would kind of desktop and rich. Customization is not easily achievable.

  6. Loading even simple things requires few lines of coding which is simpler in plain html or jQuery.

  7. Debugging is not very easy. Only GWT has bit better debugging in hosted mode among javascript frameworks.

  8. It is not possible for the user to bookmark a certain page . Since the objects are rendered by DOM manipulation, page can not be indexed by search engines

  9. Need quite experienced developer.

  10. I'm not sure how to use this without the entire display being EXT. I would prefer something that could integrate into what we already have.

Reference: ExtJs - The Pros and Cons

Hope this helps.

TheHippo
  • 61,720
  • 15
  • 75
  • 100
talha2k
  • 24,937
  • 4
  • 62
  • 81
  • 3
    Pro #5 makes no sense outside of the context of the article from which you copied this. Also, note that the article is referring to Ext JS 3.0, which is a bit out of date at this point. – Brian Moeskau Nov 14 '11 at 06:46
  • I'm implementing a classic desktop application and my customers aren't too picky about custom css. The application is using tabs, dynamic toolbars, editable and filterable grids and some other stuff. Ext is a great choice! The big con for us is drawing - it takes some work to load images dynamically, and to maintain size and w/h-ratio the way you expect. Vector graphics is supported but only as SVG primitives, so if you're making custom graphics it's a bit of work. – emolaus Apr 09 '13 at 07:04
  • i think another cons is that crawlers would not be able to index your page very well – alcedo May 30 '13 at 05:58
  • 1
    @alcedo: RIA frameworks like ExtJS aren't designed for crawlable pages. They're intended mostly for admin/enterprise-type apps. – Dan Dascalescu Jan 07 '15 at 13:36
  • 1
    This answer is pretty misleading actually. @bmoeskau's should be [the accepted answer](http://stackoverflow.com/a/8118396/1269037). – Dan Dascalescu Jan 07 '15 at 13:38
14

Although the previous answer was already accepted, there are a few points I'd like to clarify.

Ext does not use a "modified" GPL license. It is fully dual-licensed under the standard GPL v3 and the Sencha Commercial License. There are FLOSS exceptions to make it further compatible for plugin/extension developers, etc., but the GPL license is the standard license.

The list of Cons, while mostly fair points in general, is somewhat meaningless without some context. Comparing Ext JS to jQuery is also meaningless -- that's comparing apples to oranges. If you compare Ext JS to other comparable RIA frameworks (Dojo, YUI, Sproutcore), then things like footprint, CSS/HTML complexity, debugging, etc. become pretty even (or at least a more useful contrast can be made). Just saying that those things are "cons" in the abstract is not really accurate, since they are mostly just requirements of any complex RIA framework.

Regarding a few specific points, this list (according to the source article) references Ext 3.0. The current version as of this writing is 4.0.7. The total code footprint has actually increased since 3.0, but Ext now ships with a dynamic class system and build tools that allow you to create optimized builds based on your application's dependencies. So yes, it has a large total footprint, but no, you do not have to include everything.

CSS/HTML complexity is a given, based on the complexity of the widgets and the layout systems supported by Ext JS. This is very common in the world of RIAs and not comparable to simple jQuery plugins. Ext 4.0 now uses SASS/Compass btw, with generated CSS, so customizing the source styles is actually much easier now than in 3.0.

Debugging is also somewhat easier in 4.0 (again due to the new class system) but is certainly harder than any statically-typed language like Java (GWT). This is an issue for any JavaScript based frameworks, not just Ext.

It is certainly possible to bookmark pages in your app if you implement history/state support (both offered by Ext). This is something you must do since it is app-specific (there is some automatic state management at the individual widget level) but it's certainly possible. Again, this is a common RIA issue, not anything specific to Ext.

The list of Pros I would agree with (except point 5 which is presented out of context and makes no sense). In fact the documentation and help guides have gotten way, way better since version 3.0. If you want specific comparisons between Ext JS and other RIA frameworks, just search SO as that's been well covered before.

Community
  • 1
  • 1
Brian Moeskau
  • 20,103
  • 8
  • 71
  • 73
12

What you are trying to do with the framework is going to determine which one to use.

ExtJS

is great for a single page RIA application where ExtJS framework is loaded once on the page with next to 0 hand coded HTML.This means that the framework manages EVERYTHING in your application.


JQuery

use case is much different: your server side framework generates HTML (via JSP, GSP, ASP, whatever) and you add functionality to those pages by including JQuery library to each one.


ExtJS Cons:

  1. Complex framework - not for the faint of heart :)
  2. Steep learning curve
  3. There are bugs - yes there are. However, most issues arise from not using the framework correctly and not understanding the documentation thoroughly enough.
  4. Evolving framework - this can be viewed as both + and - but there has been ~7 releases this year.

ExtJS Pros:

  1. Truly versatile client side MVC framework with the most complete set of components and widgets currently available.
  2. Extensible. Literally Ext.extend() is the first thing you do.
  3. Beautiful. Out of the box theme is so well designed that most devs with no theming skills ( we are not pointing any fingers) can create truly professional and good looking web apps.
  4. Documentation is by far the best I have seen of any library, API, or open source project. Complete with API docs (even though some holes are there) with live code samples you can tweak and see what happens + source code. Great examples spanning most of the library. Excellent guides on most important topics from MVC to Theming. Even a video library. This documentation has been greatly updated recently so if you have not seen in the last 6 months - well, go look!
  5. Forums are very much alive with many key experts actively participating on daily basis.
  6. User Extensions (UX) - a large user community leads to an amazing array of creative solutions.
  7. It's giant! It has so many great components that I have not had a need to truly extend something beyond recognition. Did I mention the learning curve?
  8. MVC - for any self respecting RIA app MVC framework is a must
  9. Built tools
  10. Theming support with SASS and Compass
  11. ... there is much more.

disclaimer: I am a former frustrated ExtJS developer who is finally high enough on the learning curve to really enjoy it :)

  • (open to as a community wiki )
dbrin
  • 15,525
  • 4
  • 56
  • 83