Book Review: Learning the Yahoo! User Interface Library - AJAX, Animation and Buttons, Oh My!
(Page 3 of 4 )
AJAX came on the scene in 2005, and has been growing in popularity in leaps and bounds. No modern book that deals with user interfaces for the web can ignore its impact. The ability to reload part of a page instead of the whole thing gives site visitors an experience that feels much more like a desktop application. AJAX encourages web interaction, and made web 2.0 really take off. Naturally, though, many browsers handle AJAX in different ways; the YUI library delivers cross-browser compatibility with the Connection Manager. Wellman demonstrates its use with the example of building a newsreader.
From the newsreader we move forward to learning how to build a login system. This gives us more experience with how this part of the YUI library handles HTTP methods such as get and post. As with all examples in the book, this one is accompanied by plenty of code, complete explanations, and all appropriate screen shots.
In the fifth chapter, Wellman covers animation and the Browser History Manager (BHM). The YUI library's Animation utility puts a lot of power in your hands, letting you animate practically any property of an element with a numerical value. To make an animation, you create a constructor that takes four specific arguments (only the first two of which are absolutely necessary) and apply it to the object you want to animate. Wellman helps us practice what we learned with the example of an accordion-style widget.
As to the Browser History Manager, it helps you pick specific states in a user's interactions with your animation that the animation will return to when the user presses the forward or back buttons of their browser. This handy utility can decrease your visitors' frustration with animated applications.
Chapter six walks us through the YUI library's Button and TreeView controls. Wellman explains that the YUI Button control is different from other button controls because you can do more than just push it; in fact, there are eight different types of buttons, each with their own special behavior, such as checkbox buttons, radio control buttons, menu buttons, and a split button with two clickable areas, the second of which can modify the behavior of the first. Wellman shows us how to use these buttons in a form, an appropriate example considering how ubiquitous these things are on the web. He also does a good job of showing off the TreeView control, which allows you to show the relationship between objects in an intuitive way – think of the way the links on your browser look when you've opened the folders in which you've stored them so you can see all of them, for example.
Next: Navigating the Rest of the Way >>
More JavaScript Articles
More By Terri Wells