Marcos Placona
Marcos Placona
Developer evangelist at Twilio, GDE and in ❤️ with Open Source
8 min read

Categories

  • books
_Book reviewer Marcos Placona Publisher: Packt. Author(s): Jonathan Chaffer and Karl Swedberg_

JQuery is one of the coolest JavaScript libraries ever released, and has been growing massively on the Web Development scene since it’s release in early 2006. As a big fan of JavaScript libraries, I decided to write this book review.

Learning jQuery” is a great complement to jQuery’s official documentation, having a nice and clean structure all the times within the book

The book is divided in ten very illustrative chapters containing code samples, and excellent comments related to what is being presented. It also assumes that you have never had any contact with jQuery, but have some knowledge of JavaScript.

The chapters are:

Chapter 1: Getting Started

Chapter 2: Selectors: How to Get Anything You Want

Chapter 3: Events: How to Pull the Trigger

Chapter 4: Effects: How to Add Flair to Your Actions

Chapter 5: DOM Manipulation: How to Change Your Page on Command

Chapter 6: AJAX: How to Make Your Site Buzzword-Compliant

Chapter 7: Table Manipulation

Chapter 8: Forms with Function

Chapter 9: Shufflers and Rotators

Chapter 10: Plug-ins

Appendix A: Online Resources

Appendix B: Development Tools

Appendix C: JavaScript Closures

The first chapter gives you a big overall about what jQuery is, and where it can help you; giving some day-to-day examples and telling you a little bit more about where to use jQuery to extract it’s maximum performance.

It will also give you all the basic explanation about how to install and configure jQuery.

Moving on to the second chapter, we start to learn how to use jQuery selectors, which in my opinion are just one of the best features of jQuery. Using selector you can make changes to the DOM (Document Object Model) on the fly, and that means you will be able to put aside all the complex regular expressions you used in the past, and use something as simple as:

<br /> ('a[@href^="mailto:"]')<br />

If you move forward to chapter 5, you get information about DOM manipulation more in depth.

Chapter 3 talks pretty much about how you can change stuff on page load. It’s really useful to be able to do this kind of thing, as before we’d need to call a function on the onLoad event. With jQuery, you simply put all your code / functions inside the:

<br /> $(document).ready(function(){<br /> ...<br /> });<br />

And you can pretty much do all your changes surrounded by the code just posted above. It also shows how to attach and remove events, as well as a great coverage of cross browser techniques.

Chapter 4 is more focused on the design side, and will show you lots of easy and interesting improvements you can do with jQuery when trying to give a better user experience. Pop-ups and alert validations are left behind here, and a whole new gamma of opportunities is opened, with some excellent examples, you will be able to remove all the ugliness and 90’s feeling of your website, and launch a whole new and improved WEB 2.0 website.

**
Chapter 5** as said previously covers Chapter 3 more in depth

Moving on to Chapter 6, you will learn a lot about how jQuery easily integrates with the so called AJAX, where you will learn how to access JSON objects, load content on demand, send data to server and serialize post requests.

In my opinion, this chapter has to be read at least 3 times, as every time you read it, you realize that there’s one thing you’ve missed on the last read. Although the book is pretty intuitive, AJAX is a very complex beast, and the more the merrier. It was one of the chapters I really enjoyed reading, and the Authors were sensible enough to think about security issues and security limitations the developers can find across the path.

Chapter 7 is a massive reference about table manipulation, where you will learn a lot about how to perform changes on your tables, without actually have to fiddle with the code generated by the server request. It’s very useful for designers as well.

**
Chapter 8 and 9** go towards the same direction of chapter 7, but telling you about how to interact with web-forms, as well as validation and also uses some AJAX calls to retrieve data from the server. Chapter 9 will give a full example of how to do things like banner rotators, how to consume web-services and how to give your end-user a better experience when navigation through your website.

Up to here, a lot have been discussed about how to create your own code, but in most of the cases, it’s not necessary to reinvent the well, as some other developers have already done that for, and that’s when we move on to Chapter 10

It’s a very well explained and exemplified chapter, giving you a very good grasp on how to use user defined plug-ins for pretty much anything. The book also gives you very nice URL’s for resources on where you can find those plug-ins and how to extend them. There’s also e very well covered part on how to create your own plug-in and how it can be made extensible. This used to be a very hard task when done with pure JavaScript, but turns out to be “piece of cake” here.

**</p>

Sections A, B and C</strong> cover lots of online resources, tools and some tips and tricks.

Of course most of this information can be found on the Official Documentation, but in my opinion, it’s a big puzzle, and you need to find most of the pieces of it, and will always start from the edges, when you sometimes need the middle of it. Those who tried to use it before, will know what I’m talking about, and see that this book is a must if you want to use jQuery on your applications.

I have learned a lot with this book, and although I was working with jQuery for some time, it was very good to recycle everything I knew as well as understand some technical points about why I was doing it that way.

I’d like to leave here my special thanks to the fine guys at Packt who sent me this book for evaluation and technical review