Top 5 Reasons to Use the Yahoo! UI Library (UI)
Allowing client side scripting whenever usable instead of forcing the server into action can be a tremendous boost in performance and response time. This sounds beautiful in theory and it is — the problem arises in browser support. Anyone who has done web development has come across the issue of supporting multiple browsers when writing JavaScript.
As the complexity of the task increases, the ability to get it right on most browsers seems to decrease. This of course is purely a scientific observation of course!
Many of the things that require JavaScript are easily broken into categories, so there is a lot of repetition in re-implementing these time and time again. In comes the Yahoo! UI Library (YUI).
The Yahoo! User Interface (YUI) Library is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX.
There are at least 5 simple reasons you should be using these libraries instead of writing your own:
Number 1 - The code is released under the BSD license
The most important part of the BSD license from a commercial perspective is that it allows proprietary commercial use. This means you can incorporate the code into your website, regardless of its purpose. The only stipulations come from requiring the copyright to remain in place (you can’t just strip out the licensing information and claim it as your own).
Another great aspect of releasing under this license is that if Yahoo! goes out of business, the code is still available and legal to use.
Obviously you’ll want to read what the BSD license means in more technical terms before you go blindly jumping.
Number 2 - Graded Browser Support
Quality Assurance verified graded browser support. The code you’re using really does work as advertised in all those browsers.
How will the JavasScript degrade when used in older browsers? Is my browser supported?
This is all clearly laid out, ready for review, and bug fixes applied if there are any discrepancies.
Number 3 - Standardized Base Objects
It’s always easier to build a brick house if you don’t have to make your own bricks. Since the YUI library includes standard building blocks that many web developers will want to use you have a great starting point.
The library is written in an extensible manner utilizing the object oriented nature of JavaScript. It may take you a couple hours to get used to the prototype based object oriented method, however the results are clear and expendable when you have a clear grasp.
Number 4 - Large Active Developer Environment
Strength for a library and a language comes from the surrounding environment. If you can’t get any help with what you’re working on, or see what others have done, your progress and efficiency is hindered. There is a fantastic support community wrapped around the YUI environment.
I have had discussions on the list a few times and come away with answers to specific questions each time, and in a timely fashion.
Number 5 - Beta Releases of Bleeding Edge Ideas
New ideas — implemented and ready for experimentation, are released as beta’s or experimental. The most potentially impacting package to be released thus far is the AJAX Browser History library. One of the largest complaints with AJAX technology has been the demolition of the browser’s back button functionality.
The YUI Browser History Manager is an experimental component designed to facilitate the creation of web applications in which the navigation buttons are fully functional and in which broad aspects of an application’s state — what panels are open, what tabs are active, etc. — can be bookmarked.
With release additions like this appearing, the library not only has a strong base but is taking a stab at the future as well.