Book review: Closure: the Definitive Guide
I have to admit that I couldn’t remember who Michael Bolin was when he first contacted me to review Closure: The Definitive Guide. The embarrassment turned worse when he reminded me that he interviewed me at Google almost five years ago, before I joined Yahoo!. Having had the chance since then to grab lunch with Michael, the somewhat blurry events of that day in 2006 came flashing back – especially because he had done the “lunchtime interview” portion of my day.
Since that time, Michael had gone on to contribute to Google’s Closure library, an incredibly sophisticated universe of tools for developing web applications. There literally could be no better person to write The Definitive Guide for Closure than Michael. Having very little knowledge of Closure, I was the target audience for this book. I had no idea just how large the Closure library truly was, encompassing a JavaScript library, the compiler, and a templating system (Google also just recently released, with the help of Michael, their CSS system as well – though this is not included in the book).
The book is incredibly well-written considering the daunting task of documenting each piece of the Closure ecosystem. Michael does an admirable job of not just explaining what different pieces do, but also why they do it that way. Every time I found myself saying, “hmm, I wonder why they did that,” the next couple of paragraphs were spent explaining the design decisions and how they work together with the overriding design of Closure. It’s not hard to see that Google engineers spent a lot of time thinking through every little piece of Closure, and Michael consistently dropping in details of these decisions is, in my opinion, the real gold of this book. You really get a sense for what it’s like to build a massive, fine-tuned web application from the perspective of Google. While you may or may not agree with the approach, it’s very nice to actually read about the decisions rather than just, “accept this, we know what we’re doing.”
That being said, I did walk away from the book feeling that the entire Closure ecosystem is too complex for me to start using. The ability to quickly get up and running just isn’t there, and that’s okay, because Closure wasn’t intended for small web sites. However, the vast amount of knowledge you need to keep in your brain to use Closure to its peak is quite overwhelming. Michael says that you don’t need to use all of the pieces of Closure if you don’t want to, and that’s absolutely true. However, the value of the whole system used together is clearly much greater than the sum of its parts. So while I could see people using the Closure Compiler without using the Closure Library, I’d be shocked to find people doing the opposite.
I commend Michael for taking an extremely complex project and writing about it so thoughtfully and thoroughly. If you want to learn about Closure and the way that Google thinks about web application development, this is certainly an excellent book. However, I don’t think the book will pull people away from their current set of tools
Disclaimer: Any viewpoints and opinions expressed in this article are those of Nicholas C. Zakas and do not, in any way, reflect those of my employer, my colleagues, Wrox Publishing, O'Reilly Publishing, or anyone else. I speak only for myself, not for them.
Both comments and pings are currently closed.




3 Comments
Closure looks like a very basic, incomplete and over-engineered library.
I prefer to use Ext JS or Dojo for large applications and jQuery for smaller applications.
For charting I use Highcharts and Raphael for drawing.
Les on November 22nd, 2011 at 10:14 am
The book is actually a very useful guide for Google Closure Library.
But I don’t agree with the part that it’s hard to move over to Closure style, there are really few steps to do.
For sake of simplicity, I’ve created a boilerplate repo for any project to use Google Closure Library. It actually uses the JS library that we have developed which works perfect with Google Closure Library.
Boilerplate has build scripts and all tools ready.
https://github.com/dashersw/BoilerPlate
Just fork and start coding, it’s that simple.
Armagan Amcalar on December 6th, 2011 at 6:37 am
@Les, I don’t agree with you. Closure library is not incomplete but it is still under development like others. When you don’t understand the “ecosystem” completely, you should not say its over-engineered.
@Nicholas, Great interview. I totally agree with “However, I don’t think the book will pull people away from their current set of tools”. But I don’t think Google aims on this way.
Google Closure Library is not suitable for newbie developers. It’s so much complicated than other frameworks expect ExtJS. Also I want to add, Closure Compiler is a great tool when you write your code Google style like JSDocs and annotations. Thanks for review.
Fatih on December 6th, 2011 at 6:37 am
Comments are automatically closed after 14 days.