Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Ext-JS in the wild? Abstract away or not?

I work at a company that uses Ext-JS for our product. The product currently over extends Ext-JS components and overrides parent functionality. This has made upgrade difficult at best. We are keeping Ext-JS but are looking into using it in a non-bastardized way. There seem to be two camps. In one camp the members think we should write an abstraction on top of Ext-JS in case we decide to change frameworks in several years, hopefully that way we are less locked in. I personally think that's a silly goal, so I sit in camp number two. My reasoning is the Ext-JS team has spent their time coming up with a reasonable abstraction for the web--they are in the domain to solve that problem, whereas we are merely trying to implement a cool product. I think if we write an abstraction it will assume Ext-JS. I see us writing inferior abstractions that are less powerful and that won't map to the jQuery world (or any other framework). Opinions on the correct course of action?

like image 649
Justin Thomas Avatar asked Mar 17 '11 12:03

Justin Thomas


People also ask

Is Ext JS outdated?

Ext JS is still a great framework for certain types of web apps. For business apps, especially for internal company apps, it's a great choice as it has the batteries included: lots of controls that easily link up to data and create apps very rapidly. For public-facing apps I like it less.

What are the advantages of using Ext JS?

Though you can utilize JQuery or something similar, Ext JS's advantage lies in multiple UI components that go along with it. The main purpose of the Ext JS framework is to allow developers to design perfect and scalable web apps.

Is Ext JS popular?

Our reports are updated daily. Ext JS is used by less than 0.1% of all the websites whose JavaScript library we know.

How does JavaScript ext work?

It has the path defined for all the other files used in that application such as store, view, model, require, mixins. View. js − It contains the interface part of the application, which shows up to the user. Ext JS uses various UI rich views, which can be extended and customized here according to the requirement.


2 Answers

I agree with you; I think it's a silly goal. Here's why:

  1. In the end (after several years) you may not change frameworks. If you don't, then you spent extra time and resources adding a layer of abstraction that doesn't buy you anything. Not only will it fail to complete the goal you set out to accomplish (diversifying your options), but it will add to the amount of code that you and your teammates need to maintain.

  2. You can always modularize your project with other Javascript libraries to suit any needs that ExtJs doesn't fulfill. For instance, if you do not like ExtJs's charting implementation, then you can include jQuery and use a plug-in like jqPlot.

  3. It will be difficult to write an abstraction that applies to both current and future libraries. How can you guarantee that your abstraction will withstand changes in either your current library choice (ExtJs, etc.) or any future JS library that you fancy in the future.

Just a couple of points for thought. Overall I think it would be a bear to maintain, so I would pick a diverse library that meets most of your needs and then add in smaller libraries if necessary.

like image 78
McStretch Avatar answered Sep 23 '22 19:09

McStretch


I think option 2 is the better option. If you build a great web app and it works really well, what are the chances of you actually changing to a new framework?

ExtJS is designed to be extended. I would definitely recommending using Ext.extend() vs Ext.override() to do the extensions though. Using this method to do your overriding you really shouldn't have that much of a hard time when you upgrade to newer version of Ext.

like image 36
Robby Pond Avatar answered Sep 24 '22 19:09

Robby Pond