Book Review – Learning jQuery
The book contains thorough tutorials and code samples on how to get things done in jQuery, and solve real-world problems, such as manipulating tabular data, grabbing information with AJAX, and implementing client side validation.
- Full Title:
- Jonathan Chaffer, Karl Swedberg
- July 2007
- Packt Publishing
In general, chapters are well documented and are also backed up by real world examples so you can see the various functions in action. For example, the Chapter entitled “Events – How to pull the trigger” starts off with an overview of jQuery’s event handing functionality, then shows a real world example in the form of a style switcher. Chapters are finalised with a useful summary so you can check what you have learnt within the sections.
The book can be read from start to finish, as it is interesting, keeps you engaged, and gives information in a logical order. It contains many useful tips and functions, a lot of which I never knew about until reading the book.
The book begins with an introduction explaining why jQuery is useful and can save time, and what it can do for you as a developer. It shows a small example to demonstrate what jQuery can do, without scaring of newbie readers. It then continues with chapters outlining the core functionality of jQuery, demonstrating this with more easy to understand examples. If you’ve used jQuery before, you might not find the first couple of chapters particularly engaging, but it gets a lot better later on (and if you read the first ones anyway like me, you might just pick up a few little techniques you may have missed beforehand!).
Chapter four contains a detailed explanation of jQuery effects and animations, it also demonstrates running multiple effects at the same time, and effect ‘chaining’. Both methods of animation are shown in examples, and well documented.
Chapter five explains how to manipulate the DOM (document object model), and covers changing attributes, adding and modifying elements, and other useful functions. It also contains a very useful example for adding footnotes to your text easily with jQuery.
Chapter six is a fairly detailed chapter on AJAX, and demonstrates to the reader how to get, and send, content dynamically to and from the web server.
My favourite chapter, chapter seven, covers table manipulation. Sorting, paging, zebra striping, highlighting, it’s all covered here, and the examples are really easy to follow and implement. I particularly enjoyed this chapter because I realised some handy shortcuts I was not aware of that will save me time when developing my own websites.
Other chapters include examples covering:
- Selecting DOM objects
- Events and user interaction
- progressive enhancement of forms (such as styling and client side validation)
- making your own headline animator, shuffling and scrolling images
- Utilising plugins
The book closes with a few appendices covering available online resources, development tools, and ‘closures’ (including information on a few memory leak bugs associated with Internet explorer).
The language used in the book is clear, concise and easy to understand. Tips and important points are highlighted and contain useful tidbits of information. I would have preferred more of these little tips to give the reader a broader understanding of the discussed topics, but they are currently adequate.
Code samples are well formatted and broken down, with added chunks of code emboldened. Live examples are also provided on the accomplying website, which is useful to get a look of what the code samples do. The examples themselves are of a high quality and useful in many real-world situations. Most of the examples are also shown along with screenshots to show you what the code is doing.
The screenshots themselves are a good quality but, being black and white, some are a little hard to understand what is being shown, and a few are slightly blurry. However, the examples themselves are available online so this is not such as big deal.
My only gripes with the book itself are that the headings could be better spaced out to improve legibility, and more importantly the book could have done with a better, bigger, index at the back; it’s hard to find certain functions using the current index.
Verdict: 8/10 – Very good, a must have for the jQuery beginner