Navigace



Learning JQuery – Book Review

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:

$('a[@href^="mailto:"]')

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:

$(document).ready(function(){
      ...   
   });

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 goes 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.

Sections A, B and C 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


Related Blog Entries

Comments
Ben Nadel's Gravatar I also found this book to be very helpful! The real-world examples were very good and really got me thinking about how I can progressively enhance my pages. In fact, it really made me think about progressive enhancement (period).
# Posted By Ben Nadel | 9/5/08 5:36 AM
Marcos Placona's Gravatar Exactly, I don't wanna put too much on jQuery's back, but it really made me think/ see in a different way.

Things that used to take ages to do, take minutes now. it's like a comparison between Java and CF (come the Java guys) :-)
# Posted By Marcos Placona | 9/5/08 5:44 AM
Karl Swedberg's Gravatar Thanks a lot for the review, Marcos. I'm glad you found the book helpful. Keep in mind that the book was written for jQuery version 1.1.x, and a lot has happened to the API since then (though, aside from the removal of XPath selectors, nothing that breaks older scripts). I've been keeping a running list of release notes of all versions since the book was published (we're now at 1.2.6!) at http://book.learningjquery.com/

@Ben, I appreciate the kind words!

Cheers to you both.
# Posted By Karl Swedberg | 9/5/08 10:43 AM

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer.

Search


Calendar

Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            

Subscribe

Enter your email address to subscribe to this blog.


Archives By Subject

A Wee Dram 2008 (1) [RSS]
Adobe (18) [RSS]
Adobe Max 2007 (1) [RSS]
Apollo (2) [RSS]
Book Review (2) [RSS]
Books (2) [RSS]
CFDevcon06 (2) [RSS]
CFDevcon08 (2) [RSS]
CFUNITED 2008 (3) [RSS]
CFUNITED2007 (1) [RSS]
ColdFusion (36) [RSS]
Flex (3) [RSS]
Fusebox (2) [RSS]
General Techie Stuff (9) [RSS]
Javascript (4) [RSS]
JQuery (2) [RSS]
Linux (6) [RSS]
Misc (28) [RSS]
Railo (1) [RSS]
Scotch on th Rocks2007 (1) [RSS]
Tag of the day (2) [RSS]
UKCFUG (1) [RSS]

Tags

adobe coldfusion misc

Recent Entries

I'm alive!

Adds


RSS


Add to Technorati Favorites


SpamStop

This blog is protected by the SpamStop plugin and Project Honeypot.
Handled in just over 4 months:
  • Total suspicious visitors: 94
  • Harvesters: 1
  • Spammers: 47
  • and 46 where marked as suspicious.
The last shady visitor was here on November 20, 2008

In just over 4 months this blog was visited 59 times by search engines and other harmless crawlers and aggregators.

More info:
SpamStop plugin
Project Honeypot