Your Garage botysf16 Amazon Fashion Learn more nav_sap_plcc_ascpsc PME Fire TV Stick Subscribe & Save Patriotic Picks Shop-by-Room Amazon Cash Back Offer WienerDog WienerDog WienerDog  Amazon Echo  Echo Dot  Amazon Tap  Echo Dot  Amazon Tap  Amazon Echo Introducing new colors All-New Kindle Oasis Segway miniPro
Customer Review

14 of 15 people found the following review helpful
5.0 out of 5 stars Comprehensive jQuery guide - a must have, October 21, 2007
This review is from: jQuery Reference Guide: A Comprehensive Exploration of the Popular JavaScript Library (Paperback)
I just finished reading the jQuery Reference Guide: A Comprehensive Exploration of the Popular JavaScript Library, by PACKT publishing, co-authored by Jonathan Chaffer and Karl Swedberg. This book is fantastic! It's a bit strange to review a reference manual because it's really just listing out all the features of the API. But, it's the way in which this is done that makes this reference guide so effective. Almost every single method and selector is explained in depth with both clear, concise code snippets as well as rendered displays when necessary. Not only did I come away with a wonderful understanding of jQUery API, I also learned more about JavaScript in general (specifically event handling and the XML[...] object).

This book is a must have for anyone that is serious about effectively leveraging jQuery in their applications. While the API is very simple, it is also extremely robust and powerful. Even when you think you have a good grasp on how things work, reading a manual like this points out all the little facets that you didn't know existed; whether it be optional method arguments or miscellaneous selectors, you probably aren't writing code as effectively as you could be, and you can't do that until you have at least a general understanding of all the features that jQuery makes available.

One of the great things that this book does, which is rare for an API-style book, is to explain, when possible, what the jQuery API is using behind the scenes to access and traverse the document object model. For instance, it explains that the getElementsByTagName() is used to filter tag-based selectors and that getElementById() is used to filter id-based selectors. While this might not seem important to understand, and after all, the whole point of encapsulation is so that you don't NEED to understand, it can become very useful in terms of optimization. For example, $( "#pagetitle" ) is going to be faster than $( "h1#pagetitle" ) since it can use the direct ID access rather than tag-based filtering. Also, $( "h2.title" ) is going to be faster than $( ".title" ) since it can use the tag-based filtering and not have to iterate over every DOM element looking for a particular class.

In addition to covering the full jQuery API, this book also contains a cursory exploration of the architecture and authoring of custom plug-ins. While the book thoroughly covers basic plug-in authoring, I wish that they had covered some more complex stuff; but, at the same time I think that that probably would be more appropriate for a plug-in based book rather than a general reference manual such as this one.

After discussing plug-in architecture, this book also explores two popular jQuery plug-ins: Dimensions and Form. The dimensions plug-in enhances the built-in height() and width() object methods that already exist. It also introduces a host of other methods that allow developers to find the dimensions and position of elements with the conditional incorporation of various CSS box model properties. The Form plug-in contains many methods that make it super easy to submit a form using AJAX, including many utility methods that assist in the serialization and accessing of form data.

The book does a good job of explaining how the individual Dimensions methods work, especially the height and width related calculations. The position related methods, while explained in depth, left me confused; the demo HTML used in the chapter is explicitly incomplete and this makes it difficult to visualize where the calculated numbers are coming from. It wasn't until I went to the demo site ([...]) that the calculations became clear. Even then, however, you can see that as much as the jQuery plug-ins try to encapsulate the cross-browser issues, there are still problems to be found. For example, calling $('div.dim-outer').offset() returned a LEFT value of 580 in FireFox 2.0 and a LEFT value of 1116 in Internet Explorer 6.0.

The book does a good job of explaining how the individual Form plug-in methods work. And, while I am not one who does a lot of AJAX form submission, I can see how using this plug-in would make that a painless process. Regardless, this plug-in also contains some great utility functions that allow you to grab form data at any given time. This can be useful for partial form updates such as the common two-selected-related scenario. My one gripe with this section is the same issue I have throughout the reference manual: callback arguments are not explained very well. With the form submission process, there are two callbacks available - beforeSubmit and success. Both methods are explained in natural language terms, but only the beforeSubmit method gets a code sample explanation (seven pages after it was explained in english). I don't know about you, but seeing a snippet of code is 10 times more clear than the equivalent natural language description.

This is very nit-picky, but as much as I loved this book, there were a few things that were not perfect; while the majority of the selectors are thoroughly explained, the big exception is the Form selectors. I have gone over this section several times and I just can't quite figure out what it means. The big problem is that unlike the rest of the book, the form selectors have no code samples; it's just be a list of input types, but not listed in any meaningful way. This section feels like an afterthought in the book.

I also felt that some of the callback methods could have been better explained. Most of the jQuery callback methods have arguments passed to them, but unless they were used in the examples, they were not defined as part of the callback function definition. I would rather have seen every argument explicitly defined, whether it was used or not, so that we as developers could see what our options were.

The only other problem with this book is that the jQuery technology is evolving so fast that the most recent release of jQuery (v.1.2.1 at the time of this writing) already has things that are not covered in this book. Not only that, a few of the things that are covered in this book, namely the XPath style selectors, are no longer supported by the core jQuery API (but rather though small plug-ins).

Overall though, this book is excellent and I highly recommend it to all web developers, especially those not yet using jQuery so that they can see just how amazing this Javascript library really is. Not only will it teach you all about jQuery, it will probably instill a better understanding of Javascript in general. From me, it gets two thumbs us.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

[Add comment]
Post a comment
To insert a product link use the format: [[ASIN:ASIN product-title]] (What's this?)
Amazon will display this name with all your submissions, including reviews and discussion posts. (Learn more)
Name:
Badge:
This badge will be assigned to you and will appear along with your name.
There was an error. Please try again.
Please see the full guidelines here.

Official Comment

As a representative of this product you can post one Official Comment on this review. It will appear immediately below the review wherever it is displayed.   Learn more
The following name and badge will be shown with this comment:
 (edit name)
After clicking the Post button you will be asked to create your public name, which will be shown with all your contributions.

Is this your product?

If you are the author, artist, manufacturer or an official representative of this product, you can post an Official Comment on this review. It will appear immediately below the review wherever it is displayed.  Learn more
Otherwise, you can still post a regular comment on this review.

Is this your product?

If you are the author, artist, manufacturer or an official representative of this product, you can post an Official Comment on this review. It will appear immediately below the review wherever it is displayed.   Learn more
 
System timed out

We were unable to verify whether you represent the product. Please try again later, or retry now. Otherwise you can post a regular comment.

Since you previously posted an Official Comment, this comment will appear in the comment section below. You also have the option to edit your Official Comment.   Learn more
The maximum number of Official Comments have been posted. This comment will appear in the comment section below.   Learn more
Prompts for sign-in
  [Cancel]

Comments

Track comments by e-mail

Sort: Oldest first | Newest first
Showing 1-1 of 1 posts in this discussion
Initial post: Oct 24, 2007 3:26:10 PM PDT
Ben, thanks a lot for the review! I appreciate the criticisms as well as the praise. I'm sorry about the form selector shortcomings. There was an error introduced sometime during the review process that stripped out the actual selectors and left just the descriptions. Granted, the descriptions aren't terribly detailed, but they would make a lot more sense if they were associated with an actual selector. Here is what it should have looked like (without formatting, of course):

:input
Form Elements: all form elements (<input> (all types), <select>, <textarea>, <button>)

:text
Text Field: all text fields (<input type="text">).

:password
Password Field: all password fields (<input type="password">).

:radio
Radio: all radio fields (<input type="radio">).

:checkbox
Checkbox: all checkbox fields (<input type="checkbox">).

:submit
Submit Button: all submit inputs and button elements (<input type="submit">, <button>).

:image
Image Button: all image inputs (<input type="image">).

:reset
Reset Button: all reset buttons (<input type="reset">).

:button
Button: all button elements and input elements with a type of "button" (<button>, <input type="button">).

:enabled
Enabled Form Element: all user interface elements that are enabled

:disabled
Disabled Form Element: all user interface elements that are disabled

:checked
Checked: all user interface element-checkboxes and radio buttons-that are checked

:hidden
Hidden: all elements, including <input type="hidden" />, that are hidden
For more information, see the discussion on :hidden in the Custom Selectors section below.
‹ Previous 1 Next ›