On the surface, many of my quibbles with the book seem like nit-picks:
- The first eight chapters seem like they could have been rolled into one;
- The section on namespacing patterns seems like it should have been its own stand-alone chapter, and not “jammed in” with the jQuery plug-in design patterns; and
- what is with the single-page final “Conclusions” chapter?2
I don’t place all of the blame on Addy Osmani for this, though. As I pondered my disappointment, I realized that his editors probably phoned it in with this one. Though some effort would be required to restructure the book, I think there was some easy guidance they could have given about restructuring the book to make it easier to bring out the highlights; but they just didn’t bother. Even if we give them the benefit of the doubt and assume that they meant for it to be published this way, I maintain that they half-assed the editing;3 for example:
- The heading levels did not always have a clear correspondence with the level of importance for that section;4
- The multiple (multiple!) instances where (unescaped!) double-quotes are used within double-quotes–and how the syntax highlighting in the text even gives this away as a syntax error; and
- Speaking of syntax highlighting, how it’s applied inconsistently throughout the electronic version of the book.
Like I said: they really phoned in the editing.
Now, there is a highlight reel here. There is plenty of useful content within the book–and this comes back to my original statement about feeling let down because of how much respect I have for Osmani. As anyone who reads Osmani’s blog (or his guest posts around the web, or his screencasts…) knows–he has a terrific pedagocial streak, and it’s clear that he enjoys helping people learn, and that he’s particularly adept at helping them learn to be better front-end developers. Throughout the first eight chapters,5 he does a fantastic job of defining what constitutes a pattern, of explaining why we (as front-end developers) should care about and study design patterns, and of what makes something an anti-pattern. Chapter Nine (the “walking tour” of the Gang of Four patterns) has the right balance between discussing the theoretical details behind a given pattern, and an illustration of its practical application. The most critical follow-up to Chapter Nine is found in Chapter Twelve, which essentially takes jQuery and uses it as a case study for those design patterns in action. Lastly, you can think of Osmani as providing a curator’s role with this book; there are many places in the text where he is citing work from others as either illustrating a particular facet of a design pattern, or else as building on it in some important way.6
Disclosure: I received an electronic copy of this book from the publisher in exchange for writing this review.
UPDATE: (9/17/2012) It seems I have not been following Osmani’s work as closely as I thought, or else I would have known that this review was for the O’Reilly version of what has already been available for free online for quite some time. That being said: I maintain that the O’Reilly version is a poor conversion of the online resource;10 but the online version seems to be easier to recommend.
UPDATE: (10/30/2012) Addy Osmani’s response in the comments of the Goodreads.com version of this review.
- Perhaps that’s the price of success? That the people that admire you wind up feeling let down when you deliver something that’s… Only average? Not mind-blowing? There’s a part of me that thinks I’m being unfair or too harsh, but at the same time… Sometimes you need to hold folks to high standards? [↩]
- Granted: I’ve dinged other books for not having a “concluding” chapter, and for otherwise ending abruptly while wrapping up some other subject (Sarrion’s jQuery UI comes immediately to mind, which I’ve previously reviewed)–clearly I would rather have a weak “concluding” chapter than no concluding chapter at all. So I’m kind of being a hypocrite here. Kind of. [↩]
- Mostly the technical editing; but it seems like the copy-editing suffered a bit as well. (My heart sank a little bit when I saw the second ‘k’ in Nicholas Zakas’ name in the reference section.) [↩]
- If we assume that a chapter’s title is an H1 heading, major sections are an H2, and so on down the list, then I would submit that there are numerous examples throughout the text where we have H2-level headings that seem like they should be H3 or below. E.g., how “Pseudoclassical Decorators” and “Decorators with jQuery” are both H2 level headings, but feel like H3 level sub-sections to “The Decorator Pattern” section; e.g., the H2 level “Namespacing Patterns” section that (in my mind) really should mark a whole new chapter in its own right. [↩]
- Again: those first eight chapters really ought to have been formed up like Voltron into one. [↩]
- And here is where recipients of the ebook version may be better off. I’m not sure how the links and references appear in the print book, but the ebook has clickable links to blog posts and other websites. Which is great. Thumbs up to that. [↩]
- I reviewed Stefanov’s book rather positively back in 2010. (Link.) [↩]
- Which has the Namespacing Patterns section at the right heading level. [↩]