Given the YUI site’s completeness, a book on the YUI library needs to bring something new to the table. In this case, organization trumps bulk documentation and creates a cover to cover read which introduces simple concepts first and leads into the more complex parts of the framework. For people just beginning to get their feet wet. the first four chapters really get things off the ground. Of all the stuff Matt writes, the segment on objects within the YUI framework is of particular importance. How YUI builds and extends objects is one of the fundamentals of many later examples (such as the Drag & Drop extensions), and having a firm grasp of the object model used in YUI 2.x makes looking through the rest of the code a lot easier. About the only thing missing is margin notes to reference the code examples on the Packt website.
Unlike the YUI site which puts introduction and APIs upfront, the cookbook is extremely example focused. The theory, the extra tables full of options are all pulled away and practical working examples are presented first. This is both a good and bad thing, although the problems in this approach are more endemic of cookbooks themselves. By focusing on the examples, Matt has made the practical side of YUI very accessible. People can dig through, find code that accomplishes their task, type it up and move on to solving other problems. The downside to this approach is the user doesn’t gain much understanding of the deeper workings of the framework or how to accomplish tasks outside the scope of the book. While most books are not paired with an excellent documentation site, this one is and by referencing the web site throughout, the cookbook can leave the more theoretical topics to the site and focus on the examples.
Disclaimer: I received a reader copy from Packt Publishing asking me to share my thoughts on the book. I’m a huge fan of cookbooks which enable someone with entry level knowledge to pick up a complex idea (and later begin playing with it).