Why YUI 2.x?
Since YUI3 is available, you may wonder why Packt
would want to publish a new book on YUI2. The author
does a good job of explaining why. Development has not stopped for YUI2 — gallery widgets are being added and improved
use(...) statement can even load YUI2 components, so you get lot of interoperability between versions.
CSS and DOM Utilities
The next chapter covers reset, base, fonts, and grid; these are CSS features which take the headaches out of consistent cross-browser design. The grid system allows nested grids of varying size, and it's easy to see how you can rapidly mock up a page layout with it.
Putting the UI into YUI
Navigation menus comprise Chapter 7, which is available as a free download from the publisher. The next few sections cover data-intensive controls such as trees, tables, autocomplete, how to link front-end UI components with back-end data sources, and how YUI handles drag and drop operations. The authors devote an entire chapter to the Rich Text Editor, and walk you through building an e-mail editor complete with formatting, input validation, sanitization against hacks and attacks, and CSS styling to make your editor look like a unified widget.
Debugging, Performance, and Wrap Up
Everyday Tools, the final chapter of the book, covers several developer tools. You see how to debug classes and events using YUI's Logger control, and how to use external tools such as JSLint and YUI Compressor to improve the quality and performance of your code.
All in all, this book is great for getting up to speed with YUI 2. The examples are useful and complete, not simple snippets, and they are provided from an object-oriented and "best practice" point of view, which is to be expected if you are familiar with Yahoo's Developer Network.