Hi, I'm Tim Millwood. I am a Web Developer from Abergavenny, UK, and work for Mark Boulton Design, specializing in Drupal. This is my blog!
Review: Drupal 6 JavaScript and jQuery - Matt Butcher
With this book Butcher has touched upon a great topic for the Drupal community, and the great thing I found when starting to read the book is not much JavaScript knowledge is needed. When reading the book I quickly scanned Chapter 1: Drupal and JavaScript and Chapter 2: Working with JavaScript in Drupal. The first chapter gives a good overview of coding languages used, Drupal and Javascript, the second gives a good overview of how Drupal can use JavaScript within a theme, and how the theming system works.
Chapter 3 was really interesting as it covered jQuery and how to create a really good script within your theme that will rotate through sticky posts using jQuery's fade functions. The first half of the chapter looks into what jQuery is, how it works and what is does. The second half is a case study of the "rotating sticky node teasers" script, and how to add this to your theme. The case study looks at each function one by one, then the major parts within that function making it easy to read and easy to understand.
Chapter 4: Drupal Behaviors looks into the Drupal.js library, another two case study is also included in this chapter explaining the use of Drupal Behaviors with jQuery. The first explains the creation of collapsing blocks and the second explains the creation of a simple text editor.
One of the great things about Drupal is how easy it is the translate, and one of the most used functions in module development is the t() function which allows the creation of translatable strings. Chapter 5: Lost in Translation covers the whole translation system from a JavaScript point of view and using the Drupal.t() function to create translatable strings in JavaScript. There is yet another case study allowing an easy way to explain and understand the topics covered.
Chapter 2 already covered Drupal theming, but Chapter 6: JavaScript Theming expands on that while also covering theming within JavaScript.
The buzz words around the internet in the last few years has been AJAX, Web Services and APIs, these are all covered by Chapter 7: AJAX and Drupal Web Services. Two case studies are used to help explain this a real world situation. Web clips with RSS and AJAX and Real-tim comment notification are two great little projects that many sites could make use of.
Chapter 8: Building a Module gives a good introduction to Drupal module development, and gives two module case studies which both use JavaScript. The book then finished with Chapter 9: Integrating and Extending which features three case studies, Auto completion and search, jQuery UI and writing a jQuery plug-in, these are a nice way to wrap up and add to all the information learnt in the book so far.
Overall the book is very good for those looking to add javascript to their Drupal site, all the information is explained in a way that makes it easy to read, understand and learn no matter the Drupal or developer experience. I can really see myself using this book a lot over the coming months.











