Yahoo! User Interface Library (YUI)

Yahoo has always provided toolkits for developers to extend (or use) its rich set of online applications and API. In part due to the same good faith effort, in part due to the web 2.0 movement, and in part because of growing competition from Google and Adobe, Yahoo released the Yahoo! User Interface (YUI) Library as open source under a BSD license.

The YUI is a set of utilities and controls, written in JavaScript, to build richly interactive web applications using techniques such as DOM scripting, DHTML, and AJAX. It has a solid set of UI controls (including sliders, calendar, tabs, trees, and the like), effects, animations, DOM Scripting utilities, and even CSS resources.

The http://developer.yahoo.com/yui/ site has lots of top-notch documentation, examples, and components cheatsheets to help developers start with the YUI.

Here is an example of the calendar UI component.

YUI also features drag-and-drop and browser Event classes. The Event class can programmatically attach an event handler to one or more elements on the page and listen for the DOM events. Some other functionality are automatic deferral of handler attachment for elements that are not yet available, automatic event scope correction, automatic listener cleanup, and so forth.

YUI has equal emphasis on the design and development sides of the web development process; at the time of this writing, it is version 0.12. It is not quite ready for the enterprise début but looks like a very solid contender in the AJAX market. Any web developer interested in the solid AJAX and DHTML library should definitely consider the YUI, and check its further evolution.

Even More Frameworks to Watch…

These are some more frameworks or toolkits that I feel need to be also motioned because they present even more options to develop with AJAX and are gaining popularity.

SAJAX is an open source AJAX Toolkit for PHP, Perl or Python. It has wrapper functions for AJAX calls. SAJAX can simplify development if you are using any of these programming languages.

Fjax (not to be confused with Adobe Flax) technology is an open, lightweight, cross-browser methodology for AJAX-style web 2.0 development: http://www.fjax.net/.

The Guise Java Web Framework for AJAX Applications addresses JSF shortcomings: www.guiseframework.com.

AJAX.NET developed in Germany by Michael Schwarz. It helps to AJAX-enable .NET applications.

The Prototype JavaScript framework http://prototype.conio.net is a toolkit for AJAX class-driven development. Script.aculo.us is based on it.

Conclusion

Currently, people trying out AJAX put little "islands" of logic on their web pages that can asynchronously do something, and perhaps that is enough in many cases. Other, more adventurous designers design entire web applications based on the fact that they can provide fancier UI and fewer pages to refresh. Time will tell which approach will prevail, but regardless of the approach, I believe that AJAX is here to stay and evolve. I have presented most of the major players in the AJAX area; now it will be up to the readers to go and try them out and decide on the frameworks’ usefulness.

I will look at some these AJAX libraries in more details subsequent articles.

References

About the Author

Vlad Kofman is working on enterprise-scale projects for the major Wall Street firms. He has also worked on defense contracts for the U.S. government. His main interests are object-oriented programming methodologies, UI, and design patterns.