Why doesn't fetching a gadget spec work the rest of the way the
Internet works?
For example:
GET
http://www.google.com/ig/modules/horoscope.xml
Accept: application/opensocial-0.9+xml,application/
opensocial-0.8+xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encoding: gzip,deflate
[other standard request headers]
------------------------------------------------------------------------
HTTP/1.x 200 OK
Content-Type: application/opensocial-0.9+xml; charset=UTF-8
Expires: Fri, 04 Dec 2009 18:14:25 GMT
Cache-Control: public, max-age=3600
Content-Encoding: gzip
[other standard response headers]
...
And the entity would contain the appropriate gadget specification for
an OpenSocial 0.9-compliant container, with localized (US English)
content.
Imagine if browsers worked like this:
How to render a web page to the User given a URL:
1. Load the document at the given URL
2. Iff the document looks like a "manifest" to other documents:
2.1. Process the manifest, looking for the desired entry (e.g.
html, xhtml, html5, etc.)
2.2. Load the document at the URL for the matched entry
3. Search the currently loaded document for "Message Bundles", for
each bundle entry:
3.1. Load the message bundle at the entry's URL
3.2. In certain places (you have to guess) perform message
substitution
3.3. Loop
4. Done
Yuck! But even worse, now there are multiple, public URLs to each
format of the same document. I might decide to link to the URL for
the xhtml version of a page. This isn't how the web usually works.
I think there are benefits to using headers for content negotiation
with gadgets too. Message Bundles and Application Manifests could be
removed from the spec, becoming internal/implementation details to
those serving up gadget specs.