Tuesday, June 12, 2012

ExtJs || jQuery || YUI

When I meet people they ask me which is good; ExtJS or jQuery or YUI or may be Dojo and this is what I feel and say. Over past few years I have worked with some of these libraries with more extensively on ExtJS and YUI (with yui-ext, does that rings a bell ☺?).


I like it. Solves the purpose!
It is very well crafted Object Oriented JavaScript library for Rich Internet Applications. It is beautiful to write classes, extend them, override methods, create objects, and encapsulate objects in JavaScript with ExtJS. It is like working with any other OOP language like, where one can use extend and understand what that means. Out-of-box  collection of component or widgets are efficient and extensible. Wonderful layouts makes the job easy for developer like card layout, border layout etc. Store makes the job easy to store data in data-structure which has rich API for query etc. Components like grids, tabbed panels, form, tree etc. are customizable and extendable and makes ExtJS even more attractive. Good community contributing to plugin development. Good documentation with implementation examples. 

It is not open source. I feel it is good for applications where there is not a whole lot of business logic happening on the client and there is less frequent DOM manipulation. It is thick on client with the amount of code it has. Until ExtJS 4 the architecture doesn’t really follow the MVC pattern, the view is either encapsulating the model or tightly coupled to model.

It is a good RIA JavaScript library and has lot into it.

Smart & Intelligent!
jQuery is one of most widely used and popular JavaScript framework in web application development. It is very thin on client. It has extensive API for DOM manipulation. It has huge community support which is contributing to jQuery and making it more rich. UI components are usually extensible and can be customized as per use. If I have web application which requires AJAX and UI tweaks then jQuery is one good solution. Documentation is good and it has ease of learning. It is very to use and integrate into existing project.

UI components are limited but there are plugin from the community. Plugins can be unstable depending on their quality. Complex UI components are not part of jQuery. Plugins might require more work to make it work with the application.



Cool!
YUI has evolved over the period of time. I have worked with YUI 1.6 with yui-ext which was extension of YUI with lots of other features. Out of box components set is rich and can be used with existing application. It was one of the first to let access to their library over the web. Documentation is extensive and it has good set of examples. It is backed up by yahoo and they have used it most or all of Yahoo’s web applications which make a good point for YUI.

YUI lacked good syntax for JavaScript. It took time to evolve through the generations of JavaScript libraries. YUI led to foundation of other libraries but could not develop the similar momentum for itself.

Now to answer the big question “Which one to use for my application”? Answer is very simple:  It depends on the application and what that application intent to do, if the application is to give RIA feeling, less data intensive on client, faster development and funding is enough to buy a rich library go for ExtJS. If price is crunch and library has to be open source and should be extensive on client DOM manipulation then jQuery is very good solution. KnockoutjsBackbone.js and many other libraries have either plugins or extensions with jQuery. YUI is also good for such applications but one lacks community and it is good for converting parts of web application into RIA easily.

No matter what I like all three of them and I feel if one implement them well they all solve the purpose.