« Another Look at Thinwire | Main | ZK Integrates with Seam, Seasar, more »

Book review: Learning jQuery

Having spent most of the Ajax era at a large dot-com writing custom JavaScript backed by Prototype and some really solid internal libraries, I'm astounded by the staggering number of competing frameworks that have been quietly chugging along while I was busy elsewhere. It's time to play catch-up. Helping me in that mission are Jonathan Chaffer and Karl Swedberg, authors of the new "Learning jQuery: Better Interaction Design and Web Development with Simple JavaScript Techniques." The title's a bit of a mouthful, but this beginner's tutorial offers the same elegance and simplicity as the jQuery JavaScript framework itself. Assuming a solid grasp of basic UI technologies (XHTML, CSS and JavaScript) on the part of their audience, Chaffer and Swedberg dive right into the basics of using jQuery to speed development of RIAs.

There's a lot to like about jQuery the library:

  • The CSS selector-based DOM traversal provides a single, unified method of manipulating your markup and data. It's less flexible than Prototype's grab bag of DOM methods, but it's easier to master. All of the major frameworks are scrambling to optimize their DOM traversal methods for speed and scalability, so it will be interesting to see how jQuery evolves.
  • The crazy method-chaining allows simple, elegant DOM manipulation. Grab a node reference, change some visual properties and add behaviors - all on a single line.
  • The stripped-down base library and plug-in framework offer an attractive solution to feature bloat and gigantic code footprints. The base jQuery library provides the underpinnings, but the plug-ins provide the bells and whistles one at a time.
  • The organization of the jQuery object itself keeps the global namespace free and other libraries working properly. jQuery doesn't rewire core JavaScript objects, either, so it plays well with legacy code written in POJ.

As with jQuery itself, there's a lot to like about the book (which shares its title with a great website dedicated to the library). The authors cover all sorts of real-world UI issues - progressive enhancement of input forms, client-side validation, visual transitions during Ajax calls, manipulation of tabular data - and show how to code them in jQuery. The examples are pretty easy to follow whether you're trying them out as you read or just skimming each chapter to pick up the major ideas.

My biggest criticism of the book is also its biggest strength: As the title indicates, "Learning jQuery" is for novices. Its audience is Web designers and programmers who want to develop powerful UIs without getting into the details of browser compatibility, native DOM methods and other other nitty-gritty client-side concerns. It doesn't speak to more advanced developers who know all the ins and outs of DOM scripting and want to understand how the framework can help at the architectural level. It also doesn't highlight the differences between jQuery and other frameworks, much less make a compelling argument for why jQuery is better.

As it happens, I think jQuery offers some real advantages over the monolithic Prototype/Script.aculo.us school of RIA development - and over many of the other frameworks out there. (More on that later.) In the meantime, Chaffer and Swedberg have provided an excellent introduction to the framework and gotten it into bookstores, where it can sit alongside similar tomes from competing school of thought. Let the discussion continue.

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/t/trackback/776034/20712620

Listed below are links to weblogs that reference Book review: Learning jQuery:

Comments

Post a comment

If you have a TypeKey or TypePad account, please Sign In

Contact Us
ajax@pathf.com

Pathfinder Development Careers

Search


AgileAjax RSS Feed

AgileAjax Email Feed

  • email feed

    Enter your email address:

    Delivered by FeedBurner

Categories