Eric Sarrion’s jQuery UI (published by O’Reilly) is a beginner-to-intermediate level overview of the jQuery UI library and its widgets.1 Sarrion walks through these widgets one-by-one, chapter-by-chapter, offering a description for each, elaborating on the UI problem that each is designed to solve, and then detailing the API for each of these widgets. Each chapter is constructed after this pattern, illustrating how to setup your mark-up to best work with these widgets, how to initialize and interact with each widget type, and then showing some example implementations of varying degrees of sophistication.
dialog(), then you can blow through chapter 4 in about 15 minutes and pick up enough to create a reasonably sophisticated modal dialog. Each chapter includes a series of tables that provide a quick reference for each method/widget’s available options, methods, and events. Further, the example code at the end of each chapter is a valuable way to get some ideas about how to put each widget into action.2 These explanations and examples are easier to digest than the documentation3 and examples that are otherwise available in the jQueryUI.com demos.
- Sloppy mark-up. Sarrion mentions that Internet Explorer needs a doctype, but then does not go on say what a doctype is, or why it’s necessary or what the consequences of omitting the doctype are… And/but then he doesn’t quote the attribute values in his sample HTML either. Even a footnote or two on such subjects would suffice.
==comparisons, browser detection7, and other minor transgressions. I take issue with these mainly because of what I perceive to be the audience: if the book is targeted toward beginner and intermediate level devs, then we have a responsibility to set a good example.
getDate, don’t let it break onto two lines like that.8
Disclosure: I received an electronic copy of this book from the publisher in exchange for writing this review.
- Sarrion’s jQuery UI covers version 1.8, but I noticed that it does not cover the
positionutility. As the
positionutility is currently flagged on the website as “new”, then I presume that the book went to press before that utility’s release. [↩]
- Though I was disappointed that there was no associated Github repo. [↩]
- I’m tempted to go as far as to say they’re “superior” to the official documentation, which I’ve always felt were sort of tacked on. It isn’t as though jQuery UI has a terribly complex API (it doesn’t, though it is quirky and idiomatic-unto-itself (which: “I guess it’s internally consistent, at least”)) — it’s just that the official docs focus more on the examples and bury the actual documentation “down there” below the fold, like an after thought. “Minus one to that”, if you ask me. [↩]
- Turns out that you can. But: !?!?!? [↩]
- A thing I don’t like, but whatever. [↩]
- Doubly dangerous because they’re missing their curly braces. [↩]
- As opposed to feature detection. [↩]
- Table 8-9, I’m looking in your direction. [↩]
- E.g., a junior or mid-level dev in an organization that is already using jQuery UI; e.g., an e-commerce shop that is heavy on back-end devs and just wants to put some quick polish on their site. [↩]
- This is only partly true. I give Sarrion some big-time bonus points for the calculator example at the end of chapter 5 where he builds the thing up as a one-off, then re-factors it into a plugin-style widget. [↩]