Book Review of Matt Butcher's Drupal6 Javascript and jQuery

foss

I had the chance to read Matt Butcher's Drupal6 Javascript and jQuery published by Packt Publishing. So here is my short book review.

Many people, including myself, don't have wonderful memories of JavaScript. With a cryptic syntax and error messages, it didn't really do anything useful. If you're like me, don't let the title of the book scare you. The Drupal6 Javascript and jQuery does not talk a lot about JavaScript itself, it only makes a brief review of it, and moves on to an extensive coverage of jQuery and how to integrate it in a Drupal website. It assumes you are familiar with general programming concepts (such as PHP) but always makes short and clear descriptions of details specific to JavaScript.

Java_Drupal.jpg

Matt addresses the book to web designers and developers who are familiar with Drupal's basic operations. For example, the book does not include yet another Drupal install howto, but does provide a useful short review of Drupal essentials, from blocs to Firebug, to the Theme Developer module (chapter 1).

Designers only looking for quick recipes to integrate in their theme (chapter 3) may be a bit overwhelmed by the chapters that follow. They will, however, find all the necessary information to build original and useful web interfaces. Advanced designers should find the chapter on client side JavaScript theme engine interesting (chapter 6).

Developers should find everything they need in the book to create dynamic interfaces. There are good explanations of Drupal behaviours, Ajax (with JSON), the translation system (client side). It also includes good examples on how to create a jQuery plug-in.

Technically, the examples provided are realistic and useful. They do not try to reinvent the wheel and the examples make use of useful third party
projects. For example, a "new comment notifier" which is use to describe how to create dynamic events with Ajax makes good use of the "Views datasource" module. The sample code is technically correct and encourages the use of good programming practices.

Those who are not advanced programmers will get a good understanding of the code since the examples are usually shown in their full form, then the author cuts the code into smaller pieces to explain each concept in detail.

The only exception to this is the chapter on JavaScript theming (chapter 6). I had to read it twice before understanding the general idea. Some examples were not obvious at first glance and didn't look useful. For example, it presents a long example on how to create new theme placeholder functions, before showing quick examples on how to use existing functions provided by the JavaScript Theming module. I think it may have been more clear if this chapter was placed after the one on Ajax (chapter 7).

Overall, this is a useful book and a good reference. Aiming at experts, it is a good reference guide for people who are already familiar and work with Drupal. It is not one of the beginners' books, which can be found everywhere, but a good comprehensive guide for a more advanced knowledge building.

And finally, here is a PDF with chapter 2: Working with JavaScript in Drupal.

Tags: 

Cooking: