****** - Verified Buyer
4.5
I think this can be an incredibly helpful book if you hit it at the right stage in your JavaScript (JS) learning process, even if you don't need to implement full-blown MVC for your immediate needs. I can honestly say that I've learned as much, and probably more, from working through the core of this book (Chapters 1-5) than I have from any other single JS book.But, you need to be at the right stage... which is basically, when you can follow the book, although it may take a bit of effort. If you're already a ninja, you probably don't need to read the book at all, unless you simply want to be exposed to another POV. And, for a lot of non-ninja, the book will be too advanced. Luckily, O'Reilly put the entire first chapter on-line so you can judge for yourself.Chapter 1 is no namby pampy intro. In the chapter McCaw defines a constructor function used to create constructor functions that emulate classes in languages which support classes natively. He also includes a useful discussion of how the 'this' context switches in JS and how to control it with bind or by defining a jQ-like proxy method. Later design patterns have some similarity to what he does in chapter 1 (using Object.create instead of constructors), so if you can follow this chapter, you're probably ready to take on the book.I'd describe the audience for the book as developers who've already built an app, or at least added fairly complex functionality to web pages and are comfortable with prototypal inheritance, closures on inner functions, call/apply and who know basic DOM scripting. Additionally, you may well have a sneaking suspicion that although your apps work, they're not designed as cleanly as they could be. If you're part of that audience, you just might learn a boatload of stuff as you follow McCaw's thinking as to how to design large-scale JS apps. Despite the sub-title, you don't really need to know jQuery (jQ) all that well, as long as you're somewhat familiar with it and the way it chains methods. One of the nice things about the book is that McCaw often gives you the plain old JavaScript (PoJS) for some of the basic methods he adds to his template objects and constructors, before switching to jQ for convenience. For example, after chapter 1 you'll have the PoJS equivalents for jQ's extend and proxy so it's easy to create a PoJS version for say the Model object or the Controller object which he defines later. For other jQ methods used in examples, you should be at the level where you can figure out what jQ is doing and write the equivalent in PoJS if that's what you want to do.Some of the other reviews have touched on a few negatives, but to my mind they're not enough to downgrade the book. Occasionaly, the discussion seems to jump over an explanatory detail, but if you make a lab page that links to the book errata page and download the code for the examples, you should be able to fill in any gaps. I found the first five chapters fascinating, and chapters 6-13 useful and concise roll ups on various topics like dependency management, debugging and various libraries. In addition there are appendices that do a quick survey of jQuery and CSS3.The problem with learning JS in the contemporary landscape is that what used to be advanced, even esoteric, technique is commonplace now. If you go back and look at the Sitepoint JavaScript Anthology or PPK on JavaScript which came out ~2005/2006, you'll see relatively straightforward and easy to understand JS and DOM scripting. But, as Crockford noted "JavaScript is Lisp in C's clothing" and if you don't have a theoretical background in functional programming, it can be very challenging to follow the ninja use of function scope to create modules, encapsulate values in closures etc... Wrapping your head around the core of this book can really deepen your understanding of JS.