IMO this is an interesting approach, but I'm exceedingly skeptical of
changes that continue to bake in what's a rather broken gadget "type" in
the first place.

To some degree this is a philosophical can of worms, but IMO type=url
gadgets aren't really gadgtes. They're in practice an overwrought way to
generate an IFRAME URL that, in turn, performs a <script src> back to
some home server. What's more, existing ones (per iGoogle docs) can
really never work w/o iGoogle perpetually hosting script or the gadgets
themselves changing.

The uses I've seen for these are:
1. Auth. IFRAMEs just "happen" to get the same cookies as their
containing app, thereby avoiding having to support OAuth.
2. Traffic/usage measurement.
3. Turning a page-into-a-gadget.

The only real functionality you get from the gadgets framework in this
case is rpc.

#3 typically doesn't really use gadgets JS. Types #1 and #2 can be
achieved by IFRAME-in-a-type-html-IFRAME. This involves a home-baked
protocol for talking btw the "gadget" frame and the "target," which
you're essentially inventing anyway when you write a url gadget (having
to sanitize what you script src). If the target server(s) in #1 support
OAuth, you can just convert to type=proxied (type=html href=<URL>). #2
is largely covered by proxied-mode as well.

So my primary preference is to convert or treat as proxied existing
type=url gadgets. But assuming these things are an inevitability (and
they may be, if only for their uniform packaging format w/ other
gadgets; I've been complaining about them for almost 2 years! :)), code
review is:

* Could you sync/resolve and re-upload a patch? Codereview is having
trouble w/ old code and the fact that this is on incubator SVN still.
* Note that UrlGenerator is going away in a little bit, replaced by
IframeUriManager and JsUriManager (and OAuthUriManager). A parallel impl
in DefaultJsUriManager would be nice.

Sorry to be a pain; but given the substantial pain we've endured hacking
around type=url's limitations I felt it worthwhile to raise overarching
concerns. Thoughts welcome.

--j

http://codereview.appspot.com/184041/show

Reply via email to