Book Review: Pro JavaScript Design Patterns

NOTE: This is the first book review to be featured here. The idea is that I will frequently review web-related books to hopefully help give you an idea of whether or not a book is right for you. The books reviewed will all be somehow related to web development or design so you will never hear me tell you how much I enjoyed Stephen King’s Dark Tower series or Napoleon’s Pyramids by William Dietrich….except for right now of course.

Who Wrote It?

Pro JavaScript Design Patterns is written by Ross Harmes and Dustin Diaz. Ross is a front-end engineer from Yahoo! and blogs (albeit not for awhile) about random tech topics at Dustin works for Google as a user interface engineer. You can find Dustin’s musings about web development topics at This is the first book by either author.

What’s covered?

Pro Javascript Design Patterns is about…well, applying design patterns in Javascript of course. Design patterns are reusable solutions to specific, common problems that occur in development. Design patterns are more popular in software engineering, but as web applications become larger and more robust, design patterns are starting to become a bit more well known in the web development world.

Dustin and Ross do a great job of explaining different design patterns and showing how to apply them in the world of Javascript. The book starts off by walking you through some object-oriented principles as they relate to Javascript. There are sections on such advanced topics like interfaces, encapsulation, inheritance and chaining. The second part of the book dives right into design patterns. For each pattern, you get to see how to implement it in Javascript, when to implement it, and the benefits you will see. Design patterns can also create difficulties if used inappropriately, so Ross and Dustin take a look at the disadvantages of each pattern so that you can accurately determine whether or not to use it in your applications.

Should I Read It?

The book definitely holds value for any person working with Javascript and front-end development. The ideas laid out in the book can help anyone working with the language to create higher-quality, efficient code. Particularly developers who work with large scale Javascript applications will benefit from the book, as that is what design patterns seem to be best suited for.

Make no mistake, the book’s title starts with the word ‘Pro’ for a reason…this is not a book intended for beginners. It is a very concisely written book that doesn’t take a lot of time setting the tone…the authors dive right into advanced concepts and code. If you are just getting rolling with Javascript or you don’t have a good grasp of object-oriented programming in Javascript, then you should probably pick up another book and come back to this later. On the other hand, if you are familiar with object-oriented programming in another language, you may find the book still manageable. That’s part of the beauty of design patterns…the theory works regardless of the language…it’s the syntax and implementation that can differ.

Final Verdict

All in all, I really enjoyed the book. It can take awhile to work your way through it (this is not a bed-stand book), but it is definitely worth it as the concepts addressed are invaluable to creating quality code. For anyone doubting the power of Javascript, this book is a real eye-opener. You will find that Javascript’s flexibility offers a lot of possibilities and by using it, along with industry-recognized design patterns, you can develop scripts that are both easy to communicate and easy to maintain.

Great…Where Do I Get A Copy?