HTML5, CSS3, jQuery, JSON, Responsive Design...

Some JavaScript books

Michael Brown   January 24 2010 05:14:39 PM
"Nearly all of the books about Javascript are quite awful. They contain errors, poor examples, and promote bad practices. Important features of the language are often explained poorly, or left out entirely."

So says "javascript guru", Douglas Crockford, whose work you're bound to come across at some point if you do any serious research into the language.  Having thumbed through quite a few Javascript books recently, I have to agree with him.  Basically, most of these books treat JavaScript as if it's any other OO language such as C++ or Java, merely pointing out any syntactical differences along the way.  And if you've read any of Crockford's work - there's plenty around, just Google - then you'll know that JavaScript isn't quite like any other OO language.

This is particularly true with regards to JavaScript's object-oriented nature.  Javascript is an object-oriented language but it has no classes!  That's a huge difference right there, and it's one that most JavaScript books that I've looked at don't even begin to address.  They simply treat certain types of functions as if they are classes, without explaining to the reader what's really going on.

Still, there are some good books out there.  Let's start with the one book that Crockford does recommend:

Javascript: the Definitive Guide by David Flanagan

The bible.  Works as a reference book, pretty much the definitive one in fact, and also has good chapters on objects.  Just buy it!

Then, of course, there's Crockford's own book:

Javascript: The Good Parts by Douglas Crockford

This is a very different beast.  It's short, at just over 150 pages, and it doesn't hang around on any one topic for too long.  Reading it is like "bang, bang, bang" one tip after another, which can be a bit overwhelming.  But nearly every tip's a diamond, so it's well worth sticking with it.  I must have read through it four times now, and feel that I've still only scratched the surface of what's he's getting at.  A perfect compliment to the Flanagan's Definitive Guide.

My last recommendation is:

Object Oriented JavaScript by Stoyan Stefanov

Obviously, this one concentrates on object-oriented stuff.  I've not read it all yet, but the two chapters that I've have read have been excellent.  He leans heavily on Crockford at times - Crockford was one of this book's reviewers, in fact - but that's all to the good.  He takes the time to explain Crockford's OO ideas in far more detail than the man himself does in JavaScript: The Good Parts.  

1Nick Wall  1/25/10 4:03:32 AM  Some JavaScript books

I bought Object Oriented JavaScript by Stoyan Stefanov, that was brought to my attention by Peter Presnell:

{ Link }

I found the book to be excellent and would recommend this to anyone wishing to expand their JS skills.

I'll have to check out the other 2 recommendations.