1. Finding Closure

    By now, if you follow the web development world at least, you’ve probably heard that Google has open sourced a large portion their JavaScript code as a new open source library called Closure. Having been birthed from the team responsible for pioneering much of the way we build web applications today, this is obviously going to attract some attention. SitePoint’s Kevin Yank, for one, has posted a harsh critique of (some might say “attack on”) the code in his article Google Closure: How not to write JavaScript.

    Kevin seems to have taken the stance that since Google is so well known they have a responsibility to release nothing but flawless code. That, by open sourcing this library under the Google name, they’re polluting the web with “bad” code developers will flock to blindly due to the weight of the brand. This is, if I may, asinine and smells of the “fanboy” mentality that so many developers fall into when discussing the subject of something like JavaScript libraries.

    I’m not here to make the argument that Closure is perfect, or even good. I quite honestly am not fit to judge. I’d rather not know what hoops the core developers of Mootools or Dojo or jQuery had to jump through so that I can make an element fade in smoothly in all major browsers. I’m just happy when it does. I’m also a big fan of many of Google’s services. Products like Gmail, Google Apps and AppEngine have had a significant positive impact on my life and my gratitude, more often than not, insists I give the company the benefit of the doubt in many cases.

    Biases aside, the most popular JavaScript libraries all have the advantage of (in some cases many) years of open source development going for them. The framework code has long been massaged and tweaked and put under a microscope by a community of developers. A internal development team, isolated and working under deadlines trying to build something real (like say, Gmail), has to be pragmatic and will never be the ideal source for a highly tuned code base. Google has nothing to lose (except maybe some bad press) by releasing this code to the wolves. With a public repository and the help of other developers, these problems become “issues” and then patches. And, who knows, for every less-than-ideal for-loop, there might be a good idea or two.

    Competition has, in many ways, made possible the development of the absolutely stellar JavaScript libraries available to us today. To make the case that Closure will upset that balance brings to mind the current health care debate and the incumbent interests unable to look beyond what they might lose in order to see what could be gained.