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

Server to Cloud – convert a legacy platform to a micro-PaaS using Docker

April 15, 2014

The talk will begin with how to setup a local Docker development environment (Windows or Mac OSX) as Docker runs atop Linux. The basics of Docker will be examined including how to use image repositories, and a brief description of available UI’s for managing Docker containers (Shipyard and DockerUI).

Next, example applications will be built for progressively more robust use cases and deployments; to demonstrate the power, flexibility and scalability of Containerization with Docker. The first example will discuss a simple two container model to encapsulate a database and application layer, which will lead to demonstration and discussion about more robust deployments that include features such as service discovery, automatic load balancing, and abstractions to simplify linking of containers. The context of the talk with be how Containerization enables architectural choice, scalability, and polyglot environments.

Docker and supporting technologies will be discussed to expose the multitude of supporting technologies within the ecosystem such as Flynn, Serf (makes or Vagrant), CoreOS, Deus, HAProxy and more.

Technologies that may be employed within containers during the demonstration include, Java, Scala, Akka, Docker, vert.x or node.js, memcached, mysql, mongo.”

Location:


Holiday Inn Atlanta-Perimeter/Dunwoody

4386 Chamblee Dunwoody Road,
Atlanta, GA (map)

AJUG Tweets

Follow @atlantajug on twitter.

AJUG Blog