Yahoo! User Interface Library

Yahoo! UI Library, recently released by Yahoo! under BSD license, is quite a shining piece of web development toolkit. It has all the nifty Javascript utility functions/classes to build your next Web 2.0 application, in a similar fashion to other toolkits like Script.aculo.us or Rico, but backed by one of the largest company on the web.

The Yahoo! User Interface Library is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, HTML and AJAX. The UI Library Utilities facilitate the implementation of rich client-side features by enhancing and normalizing the developer's interface to important elements of the browser infrastructure (such as events, in-page HTTP requests and the DOM). The Yahoo UI Library Controls produce visual, interactive user interface elements on the page with just a few lines of code and an included CSS file. All the components in the Yahoo! User Interface Library have been released as open source under a BSD license and are free for all uses.

Good thing about corporate-backed open source library is that it is very usable right from the beginning. In fact, according to Yahoo! User Interface Blog, the UI library was started almost one year ago before released to the public. It is also functional -- AJAX, DOM, animation effect, drag 'n' drop, and a cross-browser event model, plus a few ready-made Javascript widgets like calendar and tree view. Moreover, Yahoo has a guideline on its graded browser support, including who are they committed to support (currently IE 5.5+, FF 1+ and Safari 1.3+).

Neat. If you can stand YAHOO Javascript namespace all over your code :)

However when you look around at what has already been done by other OSS libraries, YUI doesn't really add anything that is extra-ordinary special. Yes -- it has good clear defined cross browser support. Yes -- it has useful documentation. But is there anything new? YUI is on the "fat" side of the library in comparison to libraries like Scriput.aculo.us, but it is not "fat enough" to provide all the web gizmo a web developer wants (I want a tree/list control that emulates XUL's Tree control, thanks!). Hopefully more UI components are in the making.

Also with some of the examples I have looked at, I found it still lacks user accessibility from developers' point of view, i.e. it is not that developer friendly. For example, the Connection Manager library that does cross-browser XMLHttpRequest. Instead of performing operations on the object returned by asyncRequest(), you need to keep on typing in YAHOO.util.Connection... to check status, abort requests, etc. The same can be said about other libraries -- there are just way too much typing.

The question is, why is Yahoo releasing their UI library for free? One thing for sure is, since Javascript is sent to the browser in unobfuscated clear text, those who are interested in "how Yahoo! does it" would have "stole" the code anyway. It can't be Yahoo that wants to spur up the development using the open source model, otherwise other license will be used instead of BSD, where contributing back modifications is not even required.

As far I can see, it is just a stunt. Yahoo! released a well-documented open source Javascript library, so we should all classify them as the "Good Guys". Especially in the view of recent Google-related events, who "helped" ruthless Chinese government oppressing innocent Internet users. This move will surely win the hearts of many freedom-loving open source geeks.</sacarsm> :)

Honestly, I believe many other open source projects (or even commercial proprietary projects) will benefit from Yahoo! UI because it is indeed a high quality (though a bit awkward) piece of library.