11Oct
Ext-JS: Pros and Cons

Ext-JS is a pure JavaScript Application Framework developed by Sencha for building cross platform Rich Internet Applications (RIA), using techniques like Ajax, DOM scripting and JSON.

Compared with other existing JavaScript Frameworks ( AngularJS or React JS), Ext-JS is like a Swiss Army Knife: it contains everything that a developer would need to develop an application, in one product. It is, in same time, a  huge collection of visual components (widgets) and a solid development framework, implementing well-known MVC (and more recently) MVVM patterns. Unlike Angular or React JS, where one project provides the framework and another project (or projects) provide(s) components. This is not to say that there aren’t third party providers for Ext JS, but the need for them is very limited.

Another advantage of Ext-JS is that developers don’t need to worry about cross-browser rendering issues. If one still need to support really old browsers, Ext-JS is by far the correct solution. However, this will matter less in the future as the browsers continue to stabilize around standards.

Ext-JS is not for free, it comes with a license. Within the license, you get access to the Sencha full support which is very powerful, and one of the strongest reasons many organisations choose this framework. the answers are very helpful, precise,kind of a private StackOverflow with direct access to the programmers who wrote the framework.

All of these advantages come with a price. You are locked in by the framework. With Angular or React, one can write standard JavaScript and can mix and match several different existing frameworks. Since just about everything in Ext JS is proprietary, mixing and matching is not only frowned upon, but they warn against it. If you are using Ext JS, you are going to use ALL of Ext JS for everything.

Another issue with Ext-JS is related to using strict declarations ("use strict"; at the top of your IIFE block) which is a standard JS practice to protect you from making stupid mistakes. Unfortunately, you can’t do this in your Ext JS code without having to work around the problems it produces.

Ext JS offers it own layouts in order to achieve a presentation that will look the same regardless of what browser it is running on. However, the cost of this is that if you nest components too deeply, rendering your view or changes to your view will take significantly longer than anyone is willing to wait around for. So, to get around this, you end up writing sub-optimal code from just about every coding principle in existence. Specifically, DRY and SRP are difficult to achieve using Ext JS views.

Being a pure JavaScript framework and all-in-one, when developing an application, you are mainly writing JS code, Ext-JS style (based a lot on strings and conventions) and everything (HTML, CSS) is generated behind the scene. This approach was required in order to ensure cross-browser compatibility. However,the solution was to use HTML tables in order to wrap just about every standard control. This is getting better. There is less HTML generated in Ext-JS 6 then there was in Ext-JS 4, but it is still relatively ugly.

But of all bad things related with Ext-JS, the one that really makes to the top is that the framework provides something that runs on JavaScript but really isn’t JavaScript. They have their own way of declaring a class. Their own way of instantiating a class. Their own requires engine. Their own bundling and minification engine.

And, since one can’t even use "use strict" in what they have now – something that has been around long enough that it should be supported by every seriously used framework in existence – it makes you wonder what future enhancements to the JavaScript language we won’t be able to use because Sencha thinks they have a better idea.