What the Death of YUI Can Teach Developers

By Craig Buckler

The Yahoo User Interface (YUI) library has been abandoned. In a brief announcement made on August 29, 2014, Director of Engineering Julien Lecomte stated that all development would cease with immediate effect.

What is YUI?

yuilibrary.com describes the library as:

A free, open source JavaScript and CSS library for building richly interactive web applications

YUI is a collection of HTML, CSS and JavaScript components. It provides cross-browser:

  • DOM and event handling;
  • MVC application frameworks;
  • Data structures;
  • Helper utilities and functions;
  • Developer tools;
  • And HTML widgets such as auto-complete fields, calendars, charts, data tables, sliders, tab controls and more.

Think of YUI like a combination of jQuery, jQueryUI, numerous plug-ins, and Backbone, with a few other libraries thrown in. Of course, this did lead to monolithic JavaScript applications running to several hundred kilobytes but YUI 3.0 introduced increased modularization and dynamic loading to ensure components were only requested when required.

The library is supported by a considerable volume of documentation and community forums.

YUI History

YUI was founded by Thomas Sha of Yahoo in 2005 and formed the basis of Yahoo’s new Ajax-ified webmail application. The free, open source library was made available to the public in February 2006.

YUI 3.0 was released in 2009. The new version was largely rebuilt to modernize the library, introduce jQuery-like CSS DOM selectors and modularize the components.

As of 2014, W3Techs reports that YUI is used on 0.7% of all websites and 1.1% of those using a JavaScript library. jQuery is the undisputed champion — it’s used on 60.4% of all websites and a colossal 94.3% of those using a library. jQuery aside, YUI compares well with other libraries such as Prototype and MooTools but usage has been in steady decline for some time.

YUI Pros and Cons

On the plus side, YUI is a complete solution for building cross-browser web applications which (mostly) work in IE6 and above. It has also given us some great side projects such as the YUI Compressor.

However, the library possibly became too big and too complex. YUI locked you in and functionality was abstracted from the programmer. That’s fine when everything works but a development nightmare when it doesn’t.

Finally, there were complaints about Yahoo’s willingness to accept pull requests from contributors outside the company. I’m not wholly surprised given the number of critical Yahoo applications which depended on YUI.

Why has YUI Been Dropped?

Julien Lecomte admits the industry is headed in a new direction:

  • Build tools such as Grunt, Gulp and Broccoli allow us to assemble smaller modules into larger applications.
  • Frameworks such as Angular, Backbone and Ember approach application development in a more scalable and maintainable way.
  • Vendors and standards bodies are working together; there’s less need for custom widgets on legacy browsers when HTML5 can be used.

Developers rarely require a single, catch-all library. YUI interest waned and usage dropped accordingly.

I also suspect there were internal pressures in Yahoo. The company’s focus has changed: there’s less emphasis on cool developer projects and more on profitability and survival.

But I Depend on YUI!

Yahoo’s announcement gave no warning but there’s little need to panic. YUI is still available and will continue to work for the immediate future — presuming your application has been successfully completed.

The situation is less clear for partially-finished projects. Should you continue to develop an application based on a defunct library? It will probably depend on the size of the task, how much work has been completed and your reliance on YUI. You should certainly be discussing the options and, fortunately, there are numerous alternatives to choose from. Just don’t expect to find a simple drop-in replacement.

A Lesson for Us All?

It doesn’t matter which third-party library or framework you use: it will be discontinued at some point. Yes, even jQuery and Angular. That’s not necessarily an argument for developing your own system — even your own code will eventually be superseded.

IT moves rapidly and the web is one of the fastest evolving technologies. It’s increasingly difficult to keep up with advances but doing something is infinitely better than doing nothing. Pick a technology stack and stick with it while it’s practical to do so.

So goodbye YUI. The web has lost one of it’s more innovative endeavors but, like many, I wasn’t using it anyway.

  • http://learnwebtutorials.com Blissful Writer

    If we have YUI in our coded applications, is it a good idea to replace it with jQuery?

    Argument “for” replacing: Yes, by updating and keeping the app up-to-date, you will make it easier to modify and maintain in the future.

    Argument “against” replacing: Not necessarily if your app is work currently. Why do the extra work of upgrading? The “return on investment” is not there.

    Curious as to your opinion of which side of the argument do you stand on.

    • Craig Buckler

      Every project is different. A small project which could be converted in a day or two may be practical. That’s not necessarily the case for a larger project with a high YUI dependency.

  • M S

    It lasted longer than i thought.

    But then jquery has lasted longer than i thought too.

    • http://maphpia.com str

      It lasted longer than i thought.

      But then Yahoo has lasted longer than i thought too.

  • Alex Hall

    Fond memories. I started learning JavaScript at the deep end with YUI heavily involved, but it was a learning curve I really appreciate as it made jQuery an absolute doddle. It is a real shame, but as you say, times change.

  • Badru

    It’s Ember not Amber.

  • CTN

    remember when codeigniter was The PHP framework to use. but it refused to upgrade with php.

  • JoaoReynolds

    I think you meant “Ember” instead of “Amber” :)

    • OphelieLechat

      Indeed :) Fixed.

    • Phil

      Do not forget too, Amber.js is the old name for Ember.js

  • http://www.technbuzz.com/ Samiullah Khan

    I think it’s good decision, there is no point while keeping developing section for YUI when it’s not in use. I hope they might come up with some sort of successor.

  • http://www.ericlin.me Eric Lin

    I still remember in the old days (around 2008 or so), we used YUI for our projects and my first impression was that it simply too big and too heavy to be included on website. No surprise that its life has ended.

  • Jon

    Anyway, thank you Yahoo and all other YUI contributers for the endless coding hours, your efforts building YUI and giving it for free to the community.

  • Phil

    I am looking forward to the day jQuery is deprecated. Evergreen browsers and the movement of things from jQuery into ECMAScript (like document.querySelectorAll) makes it less useful. Even its awesome event binding is being replaced by event binding/event delegation in libraries like aurelia and Angular.



Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!

Instant Website Review

Use Woorank to analyze and optimize your website to improve your website to improve your ranking!

Run a review to see how your site can improve across 70+ metrics!

Get the latest in Front-end, once a week, for free.