Google Closure.. will you register your code with the Borg?
“Think! Think! Think!”, said Pooh.
Today Google announced Google “Closure”, a set of tools for efficiently working with javascript. With Google Closure Google has theoretically “closed the loop” on a number of javascript problems. Not problems developers have with javascript, but problems Google has with javascript. The problems haven’t been solved, mind you,because we don’t all use Google Closure for everything yet, but conceptually, if we did, Google would have a much easier time as web overlord.

I think it’s important to change perspective for a moment, from the Google PR and developer world perspective, to the competitive SEO perspective. I’m not saying any of this is true fact; I’m merely implying intent the same way Googlers often imply intent when looking at webmaster activity. I’ve seen Google employees look at a web site that appeared to be clean, and mark it untrustworthy simply because the webmaster appeared to associated with other sites that were not as clean. That’s the world Google forces us to live in, so Google should live in the same world. If Google expects us to be slimy, it’s a pretty safe bet that Google behaves that way as well.
So what’s this Closure stuff? Google released Closure as four related tools for working with javascript. First, a js compiler, which “compiles web apps down into compact, high-performance JavaScript code“. There is a Firefox tool, which helps you see into compiled code for debugging, since without that no developer would compile anything that wasn’t considered 100% finished. There is a “well-tested, modular, and cross-browser JavaScript library” called Closure Library, and finally closure templates, which make working with the Closure Library easier if you are totally committed to The Google Way and comfortable building js apps on someone else’s framework.
So what’s the SEO perspective? Well, you should go back and re-consider why Google may have started hosting the most popular javascript libraries on the Google content distribution network last summer. I raised the issue then but didn’t highlight specific reasons why I was giving it so much attention. Google has long distrusted javascript. Since Google can’t actually crawl and interpret all of the javascript that may be modifying published web content on the Internet, js provides clever webmasters with a means of resisting the Borg. But if we all pulled our standard jQuery and MooTools and prototype js libraries off of Google’s CDN, Google could “trust” our sites more than sites which hosted their own js libraries.There wouldn’t be any “funny business” if the libraries were known to be clean.
With Closure, Google is able to go a step further *if* we all adopt it. Javascript submitted to Closure for compilation could be “indexed” and assigned an id code on the web, so that from that point onward Google would be able to recognize (and trust?) that compiled code. Any change would necessitate a recompile (or, in other words, re-registering your javascript code with Google). Given Google’s development of the Chrome browser, Google could also offer additional incentives for code registration — it could run faster in Chrome. Or it could be pulled from the CDN like jQuery, and your project might benefit from a kick-start if you use the Closure Library and Closure Templates.
Again… I’m not saying this is Google’s intent with Google Closure. I am saying that if I were Google, I would certainly explore this as an opportunity to advance my control the web without stifling innovation as much as I would otherwise have to… such as Google has been doing lately.
With Closure, Google closes the javascript loop, with what is basically registration of js code with the Borg. Like it or not, whether Google does it today or not, it is a viable option for Google, and certainly easier than trying to license white hat SEOs.
.
.
Related questions that Google should probably answer if it wants support from developers:
- is this intended to compete with jQuery? Compliment? Or are devs expcted to pack jQuery through Closure, too?
- why built another js minifier? Dean Edward’s Packer works very well… even better than Closure according to early reports.
- what about Google Web Toolkit js library? What’s the roadmap here.. or is there a js roadmap at all?
.
.



November 6th, 2009 at 3:29 am
Google have been busy of late, im tempted to say that there is almost too much going on! I think that the thing to remember with google is that at the end of the day they are trying to supply the public with good honest and accurate information. They have to respond to what already out there to do this and although sometimes we feel like we are part of a regime its all for the greater good. I think
November 6th, 2009 at 5:59 am
I can’t help it - Borg will always be for me that strange guys from Star Trek Next Generation - those with white skin and funny tool instead of their hands. But thinking about Google’s way of treating search engine results I must say that Your post seemed to be interesting and I read almost the whole of it.
November 9th, 2009 at 10:43 am
You can find more details on using Google Closure API with ASP.NET at C# Wrapper for Google Closure Compiler - http://www.bloggingdeveloper.com/post/C-Wrapper-for-Google-Closure-Compiler-Compressing-Javascript-Files-on-the-fly-with-ASPNET-and-Closure-Compiler.aspx
November 11th, 2009 at 8:28 pm
I couldn’t help but smile when I read the Google Closure page…sounded just a bit too smooth, a bit to warm and fuzzy…which always makes me think “What is the underlying agenda here?” So, I guess the theory is, “If we (G) can’t keep up with js “innovations” then let’s encourage the developers to work within the guidlelines of what we CAN read/see.”
To be frank, it’s all getting a little too weird. Had an interesting dinner table discussion with a few mates last weekend that kicked off with the notion “What if Google broke one day?” Needless to say, these kind of stealth encroachments “in the interests of quality” make many people nervous. Do we really want a completely Google world?
As always John, insightful and makes one slightly paranoid.
November 15th, 2009 at 9:22 am
I suppose then it should be called “Google (dis)Closure”
All I want to know is if I pull my js libraries from Google, will they count it as part of my page load time? And if I get 1 Google point for hosting my js on their servers, but my local files load faster than their overloaded js servers (refer to vague, non-descript, non-committal message from Matt about how 2010 being the year of the speedy site), will I lose 1 Google point, thus negating my original point?
(Oh, and while I just made up Google points, I encourage you to spread my lies.)
November 16th, 2009 at 4:50 pm
Yes, Google Points. Nice and simple. But, Google will probably want that to be binary, as in 1 you’re in and 0, you’re out.