Book Review: Javascript: The Missing Manual

js_mm_cover

In my ongoing efforts to realize my dreams of becoming a true web ninja, I recently read Javascript: The Missing Manual by David Sawyer MacFarland.  I had read his previous book in the Missing Manuals series on CSS, and had both enjoyed it and learned a lot from it.

Good! … if a bit dumbed-down

I did find this book interesting and informative as well, but I say that with caveats, which I’ll explain.

First, I’m not sure that I was exactly the intended audience for the book.  I am pretty well-versed in programming concepts in general, and what I was looking for was an introduction to the language of javascript and when and how to use it effectively in my web sites. 

In contrast, this book seemed to be geared a little more towards pure designers who are scared of programming. A few times during my reading I had to roll my eyes at another “If this is making your head hurt, just type it in and know that it works.” 

Personally, I want to know how everything works and I’m not interested in blindly typing in code to “make it work.”  I can do that by searching google and cutting and pasting. 

I bought a book because I wanted to get deep, to learn the ins and outs of how it all works behind the scenes.  I wanted a book because I’m on my way to becoming a full-on pro, and this book at times seemed more geared towards hobbyists, or designers who just wanted to dip their toes into javascript.

It’s jQuery

Second, this is really a book on jQuery.  I don’t have a problem with that, but it needs to be said.  The first section of the book goes over the syntax of plain old javascript, including function declarations, string manipulation with built-in functions and regular expressions, math functions and operators, variable typing, etc. 

Then the author quickly moves on to the use of libraries to speed development, and specifically to jQuery.  I’ll say here that I have very ambiguous feelings regarding the need to learn the “hard way” of doing things when using a library to do it for you will normally suffice.  That’s a debate in itself, and I don’t want to get into all the pros and cons, but again, it should be said that you won’t be learning the traditional way of working with the DOM here, you’ll be learning to use jQuery selectors.

The Good

Now for the good parts.  Like the CSS book in the series, I found the information to be explained in a very readable and understandable tone. 

The book is well-paced — several times I would have an “aha – that’s cool how that works!” moment, followed by a “but wait, what if you wanted to do it this way?”, and without fail the next paragraph would address my question.  Sometimes it would answer right there, and sometimes it would say “we’ll show you how to do this with more flexibility in the next section…” so I’d know it was coming. 

That ability to anticipate the reader’s thinking is probably the best part of these books.

Also, the tutorials were again very helpful and well laid-out.  Another thing I’d like to point out is that the tutorials are not just re-hashes of the information in the preceding chapter.  There is additional learning value in the tutorials that build on what you learn by reading the chapter. 

So you get the explanations of how things are designed to work, and then you get to play with a real-world example and the book shows you how to solve the additional problems that inevitably come up.  Code examples are thoroughly explained (sometimes too thoroughly — I found myself skipping sections saying to myself, “yeah, I get it already” — but that’s definitely better than the opposite).

Learn outdated plugins

After going through all the basic functionality of jQuery itself, the book unfortunately devolves into several chapters showing how to use specific jQuery plugins for specific purposes: image gallery, slideshow, tabs, etc.  While these are certainly useful, no additional concepts or ideas were presented, just lists of the specific variables and possible values for customizing the plugins. 

This part of the book seemed like fluff to me and could have been condensed into a few short pages of charts.  It’s not that the information wasn’t useful, just that after learning so many interesting and, to me, revolutionary concepts, reading paragraphs about using “slow” if you want it to move slow, and “fast” if you want it to move fast seemed like a step backwards.

AJAX

The last section of the book is dedicated to AJAX.  Here the quality of information improves again, but again with caveats.  You won’t learn the details of setting up the XMLHTTPRequest object, but you’ll learn what is and then how jQuery saves you the trouble of knowing.

Final Word

In one way this final section about AJAX serves as a microcosm to the whole book.  It’s a great introduction, it gets you familiar with the general concepts and shows you how to get started right away, but it left me hungry for more, deeper knowledge. 

And perhaps that’s the way it should be.