Yahoo! User Interface Library 2.x Cookbook By Matt Snider review

March 13, 2011

I recently got my hands on a copy of the new YUI cookbook from Packt Publishing and I was very impressed with both its content and the style of the book. Its the first ‘cookbook’ style book from Packt that I’ve read, and I really like the format.

Each chapter is split into a series of recipes, each showing how a particular method or group of related methods are used. Once the core technique and functionality has been demonstrated there are further sub sections that show additional features and related functionality. Each section is short and easy to digest which really helps to grasp the fundamental concepts shown in each recipe. The book is divided into the following sections:

Chapter 1 Using YUI 2 a collection of common/miscellaneous utilities such as the YUILoader, the Get component, browser and platform detection and working with objects and JSON data .
Chapter 2 Using DOM and selector components recipes include searching the document, searching child and sibling elements, modifying styles and attributes, working with positions and sizes and using CSS2 and CSS3 selectors.
Chapter 3 Using event component recipes in this chapter include attaching and removing event listeners, event normalization functions, subscribing to YUI events and custom events.
Chapter 4 Using connection component this chapter covers AJAX requests and looks at the callback and request objects and their properties, event callbacks, connection manager and cross-domain requests.
Chapter 5 Using datasource component this chapter covers the datasource component in details and includes recipes showing how to use each of the different datasources such as XML response, text response and JSON response.
Chapter 6 Using logger and test components These two components can be exceptionally useful for debugging and testing large scale JS applications and this chapter covers most common scenarios with detailed and explanatory recipes and examples.
Chapter 7 Using element and button components by this point in the book we have reached the full UI components. Recipes in this chapter show common ways of using the element and button components including subscribing elements to events, manipulating the DOM and adding buttons.
Chapter 8 Using menu component This chapter is dedicated to the menu component, which offers a lot of functionality. The recipes cover the most common menu implementations including menus, meuitems, context menus and menu bars.
Chapter 9 Using animation component recipes in this chapter cover creating basic animations, creating easing functions, animating colours, motion and scroll.
Chapter 10 Using drag and drop Most simple0use scenarios are described in this chapter, including implementing drag and drop, using the drag and drop manager, drag and drop events, grouped instances, drag handles and drag regions.
Chapter 11 Using container component This important chapter has recipes that show all of the different containers that the YUI makes use of in its widgets including the module, the overlay, the panel, and dialog and simple dialog.
Chapter 12 Using datatable component Chapter 12 is dedicated to the datatable – a progressively enhanced rich table widget. Recipes focus on defining datables and columns, cell formatting, sorting, paging and scolling, and inline cell editing.
Chapter 13 Using treeview component The treeview component is the last component with a chapter dedicated to it. Common treeview implementations are covered with recipes including node definitions, navigating and searching the tree, adding and removing nodes, expanding and collapsing nodes, events and dynamic data.
Chapter 14 Other useful components Several different components are covered in this chapter, including autocomplete, the calendar, the history component, resize, slider and the tabview component. There are a number of recipes for each component that cover basic usage.
Chapter 15 Some interesting beta components The book ends with a look at some of the newer beta components including swf and swfstore, the storage component, cycle component, charts and the uploader component.

Overall, it’s quite a long book at just over 400 pages, but a book of this length is required really due to how big the YUI library actually is. The length of the book also represents pretty good value for money, and I would certainly consider this an excellent investment for someone that needs to learn YUI quickly, or have a reference for common tasks and solutions to hand.

Leave a Reply

My Books