Wednesday, May 14th, 2008

Google Doctype: Documenting the Open Web

Category: Google

Mark Pilgrim has released Google Doctype, an open encyclopedia and reference library. Written by web developers, for web developers. It includes articles on web security, JavaScript DOM manipulation, CSS tips and tricks, and more.

The reference section includes a growing library of test cases for checking cross-browser and cross-platform compatibility.

This is just the beginning for the ambitious project, which is open source, and open licensed (Creative Commons). Now it is out there we, the developers, have the option to add valuable data to grow the corpus.

Congrats to Mark on the launch. I know that it has been a huge amount of work for him, and I am excited to see it out there. Below is Mark talking about the project:

You may also notice the document reader application, which is driven by GWT.

Posted by Dion Almaer at 12:20 pm
8 Comments

+++--
3.1 rating from 26 votes

8 Comments »

Comments feed TrackBack URI

What a wealth already. And it looks like it’s got all that it needs to grow: it’s wide open. Way to go Mark!

Comment by rdworth — May 14, 2008

Implemented in GWT! :) (look at Firebug, tell tale .cache.html files)

Comment by cromwellian — May 14, 2008

wow, “goog” JS library.

wonder if anyone will be able to contribute code or just googlers (like in YUI). will they have widgets or just stick to the low level stuff?

http://doctype.googlecode.com/svn/trunk/goog/
http://simonwillison.net/2008/May/14/revision/

Comment by mundizzle — May 14, 2008

The goog js library is conceptually pretty clean, but it certainly is bloated. I think somewhere along the development path they forgot they were developing for the web. Big libraries don’t serve fast.

Comment by Anonymous — May 15, 2008

Google must have an internal JS compiler to remove bloat. Take a look at the source, there is reference to if(!COMPILED) a bunch of times, as well as talk about command line parameters to the compiler. Also, notice how alot of the method names have suffixes? I would bet that they use an internal naming scheme to somehow specify private vs public symbols. A private symbol is one that can be removed if it is not used, and can be obfuscated. A public would be one that can’t be removed because you don’t know who is going to call it, and you can’t rename/obfuscate it either.

This is one of the ways JS developers can approach the way GWT works. You invent a new DSL, call it JS++, where you adhere to a certain idiomatic naming scheme, package scheme, etc. You might even use JSDoc to declare types. Then, you build a bunch of command line tools to process the JS based on required idioms, and as long as people adhere to the idioms, you can aggressively optimize and package the JS.

Much of the perceived “bloat” is probably due to maintaining idiomatic format for everything. For example, if they were to use other techniques like defining methods by looping over an array (e.g. [“foo”, “bar”, “baz”].each(function(name) { window[name] = … } ) as some JS libraries do, it would totally break assumptions that a compiler makes.

I would bet that Google’s JS library in practice produces smaller code downloaded than most of the JS libraries on the internet which use open source packers/minifiers.

Comment by cromwellian — May 15, 2008

Google Doctype sure seems like a great initiative but for now it is lacking good quality content.

The only part that I’ve found to be useful and worth reading are security howtos that are actually quite good. Besides that Doctype has lot of catching up to do.

Still, great idea and a challenge for community I think

Comment by GregWolejko — May 17, 2008

Great peice thanks
Intresting.

Comment by Remedies — November 19, 2008

Leave a comment

You must be logged in to post a comment.