Book Review: “Learning jQuery”
With the Web 2.0 movement JavaScript got a a second chance to show off its abilities. And the second life of JavaScript is certainly a lot more interesting with advanced features such as XML processing, DOM modification and the possibility to send HTTP requests from a script to the server loading data on the fly. Because JavaScript still has to suffer from some of its design mistakes and browser incompatibilities a bunch of JavaScript libraries were created over the last four years that not only fix those problems but also extend the JavaScript core with new functions and objects that make it fun to work with.
One of the most interesting libraries is definitely jQuery by John Resig. Because the author of sees JavaScript as functional language and uses “chaining” of calls to make code shorter. If you don’t know jQuery already but have used Prototype or similar JavaScript libraries you should absolutely try it out, the results are stunning as jQuery’s expressive and short statements make the code easy to understand and very compact. For web applications this is a huge advantage because less code makes pages load faster which often is more important than actual runtime performance.
And more important than a working and powerful library is a good documentation or a guide that is written in a way that makes readers understand the design principles to get the best results of a library.
The book “Learning jQuery” (Packt Publishing) is without doubt the best guide to jQuery so far. The examples in the book are useful, down-to-earth and written without any side effects. Whenever an example in the book might introduce side effects you are warned and shown how alternate solutions for slightly different situations may look like.
The book is organized into 10 chapters: in the quick start the reader is introduced to jQuery, but not JavaScript itself. It’s probably a good idea to read a JavaScript book first if you haven’t worked with JavaScript so far. However jQuery is somehow a language on its own and you can get started quickly with novice JavaScript skills too. The next few chapters cover everyday problem situations and possible solutions using jQuery. It’s very likely that often occurring problems are already covered in the book and the solutins require only minor modifications to fulfil specific requirements.
AJAX is of course covered too, although most of the examples are framework and scripting language independent. The few AJAX examples that require server-side content processing are implemented PHP, unfortunately the code quality of the PHP examples is rather bad, fortunately there are few of them.
The book also covers some of the more popular jQuery plugins like Dimensions, Interface and Form and a quick introduction to jQuery plugin development.
The appendix is also worth reading because it includes a bunch of useful links to JavaScript and web-development resources, development tools and also a short introduction to JavaScript closures and how to avoid memory leakage in internet explorer.
The only real negative aspect of the book is the font used for the source code examples. There is no visible difference between an uppercased “O” and zero (0). Also noteworthy is the price of $ 39.99 is quite pricey, but on the other hand you get more than 300 pages full of useful information and some of the money goes directly to the jQuery project.
Conclusion: If you’re interested in jQuery and need a good book for the first steps you should definitively have a look at “learning jQuery”. If you’re already an advanced user and you probably don’t find that much of new information in this book.