jQuery and YUI (yahoo ui)

AndrewMcLagan picture AndrewMcLagan · Feb 16, 2012 · Viewed 12.9k times · Source

So as i understand it jQuery is basically a framework for DOM manipulation as a higher abstraction layer then native javascript. Where as YUI (yahoo UI) library is a user interface widget library giving the developer a means to forget DOM manipulation and work more on business logic.

Is that right?

My Question: Is there any serious performance issues with including both libraries? and how does YUI compare to jQuery UI?

Answer

Mouna Cheikhna picture Mouna Cheikhna · Feb 16, 2012

jQuery

  • $ DOM selection is powerful and works like magic.

  • jQuery code is usually very concise; helper functions exist for anything trivial (and non-trivial, even).

  • The plugin library is extensive and offers quick functionality.

  • jQuery is amazing for smaller sites and it’s easy to pick up for new users , which is why it has such a large community.

  • immediate results with less learning curve.

YUI

  • Great documentation and examples, as well as support from Yahoo with tech talks and frequent updates.

  • Code written with YUI tends to be organized. At times it even feels Java-esque. Has a rich set of modules for things other than DOM manipulation - cookies, cache, history, i18n, etc.

  • Particularly through Gallery, YUI has gotten more open to external contributions

  • YUI specialy YUI3 requires at least basic skill with the language, and more if you really want to exploit it well and extend it.

  • YUI is a lot more adapted for well organized, modular code which can be reused.

To see what YUI is capable of you can visit here for examples of YUI2 , and here for YUI3 galleries(which are IMO a bit similar to JQuery plugins ) .

You can refer this site to compare YUI and jquery's speed .

IMO JQuery is a library , YUI is a framework and not a library. JQuery is good for small websites where you want to achieve a ‘WOW’ factor in relative short time. But when you are building an application, you need a robust framework where you can integrate your own codes yui is better choice.