JQuery In Action

Book Review of jQuery in Action

jQuery in Action by Bear Bibeault and Yehuda Katz is an excellent book for learning the jQuery JavaScript library. In my opinion the book is suitable for beginners as well as advanced developers that like to explore jQuery. It is also a good reference book as it describes all the essential functionality offered by jQuery in a nicely structured manner.

I belong to the category of developers that used Prototypein the past. The funny thing is though that both libraries offer almost identical sets of functionality. You may ask why did I decide to go with jQuery?

I like its innovative way of querying for page elements and to iterated over them, allowing you to often accomplish multiple tasks with just one line of code. jQuery in Action starts out explaining those core concepts of jQuery in the first 3 chapters of the book – allowing to query for page elements using the CSS syntax, how to manipulate page elements as well as how to work with collections of elements. The book does a very good job explaining those aspects of jQuery combined with many useful examples.

What also drove me to jQuery was the fact that it has a plug-in mechanism that allows you to either use additional third party add-ons or to write your own plug-ins by still adhering to the spirit of jQuery.

In that regard it is also worth mentioning that the jQuery website is “really nice” with a ton of documentation and also providing a plugin-repository, something Prototype is lacking. Thus, for the majority of your JavaScript needs, there is now a one-stop place to get it all.

Unfortunately, the authors do not provide a comparison between both wildly popular javascript libraries Prototype and jQuery even though Bear Bibeault has been a coauthor of Prototype and Scriptaculous in Action. It would have been nice if chapter _1.1 Why jQuery_ detailed some pros and cons in that respect.

Generally, throughout the book, the authors encourage certain valuable patterns you should follow to write good unobtrusive JavaScript code using jQuery. I particularly like that aspect of the book as it shows you efficiently how to separate page markup from JavaScript code.

In that regard it would have been nice, though, if the authors had mentioned YSlow as another tool to analyze you page markup, which includes the recommendation to place JavaScript at the bottom of your page rather then on the top, if possible.

Anyway, there shouldn’t be any need to declared the _onclick{_}attributed on page elements directly any longer. It all can be separated using JavaScript events which is well described in the book.

Speaking of handling JavaScript events, I think the authors should have further mentioned the concept of event delegation. Instead, they describe how to use the Live Queryplugin in order to solve a similar issue. After reading the respective chapter, I was going to further dive into Live Query but a fellow blogger pointed out NOT to use Live Query as “it is very performance heavy” but rather to use event delegation.

I guess this is a drawback writing a book about a subject that is evolving with the speed of light.

Nevertheless, despite all my critical remarks, I think that jQuery in Action is an excellent book that will help you learn and understand jQuery. I certainly enjoyed reading the book. 

Gunnar Hillert



Posted in BookReviews
AJUG Meetup

Coding Challenge

April 30 2014

The Cincinnati Android Developers Group is extending its coding challenge to include remote participants this year! The event is April 30 and open to any developers with any skill sets. We will be sharing with each other via Google Hangouts.

The rules are simple, there is a secret project which will be revealed at 6:30. Developers will have 2.5 hours to build an application and then we will present our results. Achievements will be given for particularly interesting implementations.

Last year’s project can be viewed here : https://docs.google.com/presentation/d/17OhSmMCE6sXbbV0Qfc4uhKfx2dNve4CIN-9VRy_QQ4g/edit#slide=id.p

This is not a tutorial or learning session. Please have your development environments set up and ready to go.

Come show what you’ve got! Challenge can be completed by Web, iOS, Android, Desktop or Mobile Platform Developers!



AdvancED 9115 Westside Parkway Alpharetta, GA 30009 (map)

AJUG Tweets

Follow @atlantajug on twitter.