Customer Reviews

5
3.8 out of 5 stars
Drupal 6 JavaScript and jQuery
Format: PaperbackChange
Price:$37.43 + Free shipping with Amazon Prime

Your rating(Clear)Rate this item
Share your thoughts with other customers

There was a problem filtering reviews right now. Please try again later.

9 of 9 people found the following review helpful
on March 26, 2009
Drupal version 6 ships with a Drupal JavaScript library (drupal.js) as well as a fairly recent and powerful library that is gaining followers rapidly called jQuery.

I have been waiting for this book to come out for months, since I first heard that it was being written. Now that I have had a chance to read it, I must say that it does not fail to please.

What I wanted to learn was why Drupal chose to include JavaScript in the Drupal core, what it is used to accomplish and how. I am very familiar with HTML and CSS, and am reasonably adept at reading and modifying PHP when necessary, so all the other main parts of Drupal are built using tools I know and understand. I wanted to find out how and why I would want to take advantage of the stated and implied benefits of including the free and open source jQuery library in sites I administer and design using Drupal.

The books starts off with a very quick introduction to Drupal. It is obvious that the intended audience is not newcomers, and that this is not a basic introduction level text. It is assumed that anyone reading this is familiar with web site creation and administration, web hosting basics, and knows how to install a Drupal site that uses the default theme. You get a quick tour of the main core features of Drupal and some nice web browser tools for developers. Then we get to the meat of the book.

Starting in chapter two we learn how to work with JavaScript in Drupal by writing a short js program and discovering how to include it in a node by incorporating a link to the script in a theme. This is a clear and great beginning.

Chapter three is dedicated completely to the jQuery library, what it is capable of doing, and how to use it the Drupal way instead of reinventing the wheel. The basic point here is that it is a lot easier to use a library to perform complex tasks than it is to write a complete JavaScript function, which would then need to be adapted for different browsers, and it is easy to call those library functions within Drupal because the Drupal developers have chosen to create ways to do so that are even easier than calling those library functions would be in a standard flat HTML/CSS page or some other content management systems. There are useful examples throughout such as how to make a set of announcements display one at a time at the top of your page, fading in and out, so that you can give several tidbits of information to your site guests without requiring all of the space on your page. Cool stuff.

The book contains useful information on how to use the drupal.js library, written by the Drupal developer community, to do many tasks, such as the sample collapsing blocks project that lets guests choose whether to allow information to be displayed or to shrink boxes so that there is more space on a page. We learn how to use js to create beautiful effects and help with site theming, how it can be used to translate your site into other language for guests, and even how to build your own modules.

I have only scratched the surface of the book. I am still learning the language. By intent, jQuery is a huge time saver and makes incorporating client side functions into your site easier than using the language alone, and the way the Drupal community has chosen to incorporate that library and write their own in addition makes it still easier. I am glad I picked up the book. Now, if you will excuse me, I need to go play.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
2 of 2 people found the following review helpful
on September 28, 2009
Drupal, is a powerful content management system that allows you to build professional, scalable websites without needing a large amount of programming knowledge. Many books have been written about using Drupal to create content and theme the content so it matches your look in feel. However, not much had been written about improving the experience of users as they interact with your website until Drupal 6 JavaScript and jQuery was written by Matt Butcher.

The majority of Drupal 6 Javascript and jQuery is structured as a series of projects with complete source code and detailed descriptions of how the project works and the design decisions the author made as he wrote the code. Projects real-time notifications for new comments, a templating system, a simple text editor, an rss viewer, auto-completion for search fields, collapsible blocks, and more. All projects are so well explained that anyone with basic programming knowledge in any language will be able to follow along, but experienced developers will not find the explanations tedious. This is an extremely difficult balance to strike in a technical book. I was also impressed that many of the projects were practical and could easily be extended for use in websites. The projects even gave me ideas that I could use for sites that are not Drupal based.

The book starts with a brief introduction to Drupal and the elements with Drupal that will be manipulated throughout the book. With that explanation done, the book quickly moves introduces as to two tools that will make developing Drupal based sites with Javascript easier. The first tool is Firebug a Firefox extension which includes a powerful Javascript debugger (plus loads of other great tools). The second tool is the Devel module for Drupal. The Devel module allows you to inspect much of what is going on behind the scenes in Drupal. The Theme developer information is especially relevant for this book.

After all of the tools are been introduced, the meat of the book starts and we learn the Drupal way of adding JavaScript to our site. Some of the most valuable advice in this section are the tips which will especially help novices to learn the basics. After a quick project to demonstrate including Javascript, we dive into jQuery. The introduction to jQuery section covers the basics of jQuery and demonstrates using jQuery outside of Drupal before a presenting a project with the two combined. Using this approach definitely makes it easier to understand the jQuery syntax if you haven't had a chance to try jQuery before.

After our tutorial on jQuery, we turn our focus back to Drupal and the functionality contained drupal.js in Chapter 4. The majority of the time is spent talking about Drupal behaviors which allow you to define code which runs when a specific condition is met. The chapter also explores other key functionality which Drupal provides to JavaScript developers. Projects in this section make extensive use of jQuery to minimize the amount of custom code which needs to be written. It's also nice to see the author include information about making your code more secure, a topic which is often ignored in the interest of streamlining code.

Next we move onto translations. I have to admit that this isn't the most exciting section of the book. However, my next project will be a multi-lingual site so I'm sure that I will be referring back to this section extensively during that project. Although the topic is a little dry, Matt does an excellent job explaining all of the intricacies of handling translations in JavaScript.

As we move out of the translation section, we journey into the world of themeing from a JavaScript perspective. Themeing is essential to every Drupal project regardless of whether you are using a contributed theme or creating a custom theme that you build from scratch. The themeing system within Drupal is remarkably sophisticated. However, much of that sophistication is not available within JavaScript. Therefore, the project for this chapter builds a framework to support themes in JavaScript. The themeing capabilities are very similar to those found within PHP and include the ability to define templates which can be overridden by other developers allowing presentation to be implemented independently from business logic. Although the project itself is complicated the explanation is easy to follow and well documented. The themeing system is used in all future projects throughout the rest of the book.

The next topic is AJAX and webservices. The projects in this chapter include a webclips project which displays a random item from an RSS feed and real-time comment notifications. The webclips project uses an XML feed to get data and the comment notification uses a JSON based data feed. The JSON feed is created using the Views module. The techniques used in this chapter can be used in a wide variety of projects.

Up to this point in the book, all code has been implemented within Drupal themes to keep the emphasis on JavaScript and jQeuery. In chapter 8, the book explores adding Javascript to a Drupal module. This is done to make the code easier to deploy and independent of the theme you are using on your site. The main project in this site focuses on extending the Simple Text Editor built in chapter 4. The revised editor adds additional capabilities to the editor, makes additional use of jQuery, and makes the code easier to maintain and extend. As always, the code is easy to understand and expertly described.

The final chapter features 2 projects which both a very cool factor and could be used on a majority of websites. Rather than describing them in detail here, I'll leave it to you to read more about them.

I highly recommend Drupal 6 JavaScript and jQuery to anyone building sites with Drupal that want to make their sites more interactive and leverage the power of JavaScript.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
1 of 2 people found the following review helpful
on April 11, 2011
This is a well written book that has a lot of good information. The problem is that Drupal 6 must have changed a lot since it was written since I could only get about a third of the code samples to work. I downloaded the source code from the packt website, and still had issues. It was only when I got to the part about JSON that I noticed that the output in the book was drastically different from the output I was getting from the Views module.

I am tempted to give this 4 stars because I learned a lot going back and debugging this books source code, but I won't because after a week I've only got about 50% working and no idea how to fix the rest.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
0 of 3 people found the following review helpful
on November 2, 2009
I can't read a PACKT book without getting fortunately surprised by the high profile of the author. Thank you Matt Butcher for this brilliant masterpiece.

In order to read "Drupal 6 JavaScript and jQuery" you only need to talk "grasp" Javascript, "rudimentary" HTML & CSS and have some familiarity with PHP. If you want to evolve from PHP neophyte and Javascript looser(and perhaps hater), read this book and be careful! because Matt "Yoda" Butcher will kindly teach you the secret arts of jQuery Knights from the ancient order of Drupal.

This adventure of 324 pages begins with a courage test: Do you speak PHP, SQL, HTML, CSS, XML, Javascript? Don't fear! This book includes a gently description for each of those languages, which tells "who is who" and helps to focus on the target: Javascript. The next challenge is perhaps the most important: Drupal's Architecture. Facing you with key concepts of Drupal: Theme, Module, Node, User and Block. Then, with a solid background you will then be ready to receive your own army knife: Drupal Javascript Development Tools.

When second lesson comes is time to join the concepts of "wax on and wax off", I'm talking about Working with Javascript and Drupal, here is when the real action begins. Twenty pages before you were learning about what a theme is, but now is time to create your very first Drupal stuff at the rhythm of the unforgettable Backstreet Boys song "Step by Step". But cooking your own delicious Drupal theme with Javascript potatoes and CSS tomatoes is not enough for a dinner that you deserve. Lesson number tree will show results of your effort and dedication, it is time for jQuery!

I've just commented about of three chapters, and there are six more waiting for you! Will let you discover and enjoy this book by your self. Remember, Drupal is not hard, it just takes time (like some of the best things in life).

Blessings!
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
1 of 17 people found the following review helpful
on May 4, 2009
I find it hard to pick this book up and use it. I guess it's because it takes too long to get you to the part you need to fit your application into the drupal framework. I've skipped around a lot and I can tell there's some quality nuggets in there, I just have to do too much to find it. If i'm doing that, why don't i just google it because I know js/jquery fairly well already? Trying to do it the -right- way for drupal (and there's a right way) takes too much effort and make brain hurt. Maybe that's my fault. I'm just sharing my impression, hopefully for your benefit.

The good news is that barnes and noble carries this title often so you can read through it to decide whether or not buy it cheaper on amazon! harhar ima dick.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Send us feedback

How can we make Amazon Customer Reviews better for you?
Let us know here.

Your Recently Viewed Items and Featured Recommendations 
 

After viewing product detail pages, look here to find an easy way to navigate back to pages you are interested in.