YUI 2.5 Problems

Yahoo recently released the preview release of YUI 3.0. After reading the changes they are trying to make in the framework, I thought of the issues we have faced with the earlier version, YUI 2.5, while using it in our startup lifeMojo. Some of the issues are:

  • More HTTP Requests: JS files are split based on the functionality. This means that separate HTTP request will be made for each functionality of YUI that you use. We use lots of YUI features and our pages used to do 8-9 HTTP requests just to get the YUI files. We had to combine all those files manually into a single file to improve the performance.
  • Even if you want to use a very small subset of some YUI component, you have to get the whole component. This increases the page size and thus performance can get affected.
  • Long Names: Usage of all components of YUI starts with something like YAHOO.lang. or YAHOO.widget., etc. In Javascript, you try to avoid long names of components which are used frequently so that the size is small, for example, Prototype and jQuery, both use $ as the main variable name to access the components. But, the long names in YUI increases your page size (There are ways to get over it like declaring a small name variable as the shorthand: var YL = YAHOO.lang)
  • No Powerful Selector: YUI does not support the widely used CSS based selector idiom made famous by jQuery. We have to use jQuery along with YUI to get these nice feature.

Apart from the problems above, YUI 2.5 is quite good. It saves you a lot from the cross-browser issues and provides ready-to-use components like DataTable, Calendar, Panels, etc.

YUI 3 promises to solve a lot of the above problems. I would love to use it once they release the beta version with lot more components (due probably in December).

2 comments so far

  1. Eric Miraglia on


    If you’re using files on Yahoo’s CDN, you can get everything you need in one http request for JS and one for CSS using the Combo Handler. Check out the Dependency Configurator (http://developer.yahoo.com/yui/articles/hosting/ ) to play around with that.

    For CSS selector support in YUI, check out the Selector Utility: http://developer.yahoo.com/yui/selector .


  2. […] (Panels), etc. I have written about some of the problems in this framework in a separate post here. It is being used by Yahoo themselves and […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: