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

[http://www.hillert.com]

[http://hillert.blogspot.com|http://www.hillert.com]

Posted in BookReviews
AJUG Meetup

Building and Deploying 12 Factor Apps in Scala and Java

June 20, 2017

The twelve-factor app is a modern methodology for building software-as-a-service apps:

• Use declarative formats for setup automation, to minimise time and cost for new developers joining the project.

• Have a clean contract with the underlying operating system, offering maximum portability between execution environments.

• Are suitable for deployment on modern cloud platforms, obviating the need for servers and systems administration.

• Minimise divergence between development and production, enabling continuous deployment for maximum agility.

• And can scale up without significant changes to tooling, architecture, or development practices.

We will build a RESTful web service in Java and deploy the app to CloudFoundry. We will go over how to build a cloud manifest, how to keep our database credentials and application configuration outside of our code by using user-provided services and go over what it takes to build a 12 Factor application in the cloud. This presentation will be heavy on code and light on slides!

Location:


Roam Dunwoody

1155 Mount Vernon Highway NE
Atlanta, GA 30338 (map)

AJUG Tweets

Follow @atlantajug on twitter.

Recent Jobs