Book Review: The JavaScript Anthology

Posted on January 01, 2007  |  

Posted in Books

No comments yet

If you do any client-side development, the names of James Edwards (aka brothercake) and Cameron Adams (aka The Man In Blue) should sound familiar. If they don’t, make sure you follow their blogs.

This is a quintessential cookbook. It starts with an obligatory overview of string, number, array, date manipulation; cookies, windows, frames—the kind of stuff a good JavaScript book should have.

The other half of the book covers such fun topics as:

  • Manipulating CSS of page elements (style switcher, cool tooltips)
  • Visual effects (motion, fades, transparency)
  • Menus and trees
  • Basic Ajax
  • Custom dialog boxes (you know, the ones with annoying fade-out of the background)
  • Editable elements, auto-complete boxes, and lots more

When I first got The JavaScript Anthology, I went straight to chapter 19, Object Orientation in JavaScript. I was disappointed. It was the basic of basics of OO JavaScript. But then, as I browsed the book, I realized it wasn’t meant to be an exhaustive reference, and there’s little consensus whether the term “Object-oriented” is applicable to JavaScript in the first place. There’s plenty of disagreement on lots of things, e.g. Closures or Prototypes, so it’s a good thing James and Adam left that chapter short and simple.

I think JavaScript is experiencing a “re-birth”, and I’m sure some kind of consensus on best practices will be eventually reached. For the time being, you’re better off researching this subject on the Net.

Conclusion

I really enjoy this book. It’s a handy desk reference, and samples are clear and helpful. You’ll gain more from it if you possess at least some JavaScript experience.

The JavaScript Anthology is published by SitePoint, a vibrant online community. I’ve had some interaction with SitePoint folks on the publishing front, and they are a pleasure to deal with.

Other reading

A while ago I bought Danny Goodman’s JavaScript & DHTML Cookbook, and I didn’t like it. The recipes felt cheap and boring.

The JavaScript Anthology says it’s “the most complete question and answer book on JavaScript.” No, that would be David Flanagan’s JavaScript: The Definitive Guide or, Danny Goodman’s JavaScript Bible.

Leave a comment

  •