Ext JS is inherently wrong

Recently I changed my job and started working at a new place. I joined an already started web-based project, in which the  chosen client controls set is Ext JS. My previous experience has been with jQuery and jQuery UI, with some third-party controls where jQuery UI is lacking. The server side technology in both the new project and what I worked on in the previous place was ASP.NET MVC, Microsoft's latest offering for server side programming.

jQuery's philosophy, except for their "write less, do more" tag line, is that pages are written with HTML, and then enhanced with JavaScript. This gives several advantages, such as:

  1. The basic rendering of the page is quick, and done by the layout engine of the browser.
  2. Easy binding of form inputs to server data.
  3. If JavaScript is turned off, the page will still be mostly usable, although I am yet to see anyone who regularly browses the web without JavaScript, or any reason to do so.

So far I have about nearly two months worth of experience with Ext JS. With that, I get the feeling it's philosophy is more or less "write more, get about the same". With Ext JS, you don't write HTML at all. Somehow, the designers of this library have the notion of programming the UI with JavaScript, the same way you would construct the UI in a desktop application (well, at least until the appearance of XUL, XAML and similar declarative UI libraries). To that end, they've written an elaborate inheritance tree of JavaScript components which constructs the HTML dynamically through a series of JavaScript calls. This approach has some problems:

  1. Massive amounts of code need to be written by the developer, just to create basic controls. Every page must be accompanied with a matching JavaScript file which will construct the UI, or alternatively, the code can be embedded inside <script> tags in the page.
  2. Binding of controls to server side data is difficult at best. In particular, ASP.NET MVC has all these helper methods which create input controls with the data already in them. With Ext JS, these methods are useless, because Ext JS creates the controls by itself.
  3. Because the HTML is constructed dynamically with JavaScript, rich UI applications will easily get slow, and if the developer is not careful, will quickly hog the client memory and bring the machine to stand still.
  4. Without JavaScript, there is no page. Again, I have yet to see anyone turns off his JavaScript permanently, but it's usually considered bad design if you page fails totally without it.

Ext JS is not too complicated to understand. However, as a result of their complex inheritance model, just about every control has more than a hundred methods and a similar number of configuration options it inherited from five levels up the tree, which is impossible to master. Some of these methods are not even relevant, and are there just because some other sibling control might use them.

Like many popular JavaScript libraries today, Ext JS implements MVC in the client (well, sort of). This is something I really don't get. The UI is the View in the Model-View-Controller architecture. Why would I want an MVC inside the View layer? I think this overly complicates the application, without any real benefit. In any case, like I wrote, this is not unique to Ext JS.

And one more thing: jQuery has good support for ARIA accessibility information in its generated HTML. It seems like Ext JS is still lacking here.

We had to jump through loops to make Ext JS work with ASP.NET MVC. I personally believe constructing the page through JavaScript only is against the basic philosophy of the Web, and for that reason alone, I would recommend against using Ext JS for any project.

הפוסט הזה פורסם בקטגוריה general, מחשבים, תוכנה,‏ עם התגים , , .‏ קישור ישיר לפוסט.

כתיבת תגובה

האימייל לא יוצג באתר. (*) שדות חובה מסומנים

תגי HTML מותרים: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

WP-SpamFree by Pole Position Marketing