-John
On Mar 27, 2008, at 11:49 PM, "Nat Brown (ilike.com)"
Nat - all really good points.
I think it will be difficult to standardize URLs across containers, even given a common server base. One particular problem will be with more AJAX-y applications - even if we all agree, some will want to navigate to http://container.com/#ilike?params and some to /ilike?params (the # allows you to fake navigation without an actual browser navigation request). It's worth starting the discussion to see if we could all agree on a convention, but I'm not sure we'll converge.
Would it work if we had an API for getting a URL for a given container, i.e.: opensocial.getUrlFor(app, path, params). This would allow containers to have their own URL schemes but also support getting a URL you could actually put into links. It's a bit less convenient, as you wouldn't be able to easily generate per-container URLs from your own servers,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "OpenSocial and Gadgets Specification Discussion" group.
To post to this group, send email to opensocial-an...@googlegroups.com
To unsubscribe from this group, send
Would it be sufficient for a container to specify a URL template, e.g.
http://container.com/apps/${appName}/${appPath}?${appParams}
http://apps.container.com/${appName}#${appPath}?${appParams}
http://container.com/?app=${appName}&path=${appPath}&${appParams}
We could have a JS method and/or a RESTful method for returning the template, but the template would be assumed to be effectively permanent so apps wouldn't actually have to query it at runtime. That way they could build URLs on the server side.
On Fri, Mar 28, 2008 at 2:25 PM, Graham Spencer <g...@google.com> wrote:Would it be sufficient for a container to specify a URL template, e.g.
http://container.com/apps/${appName}/${appPath}?${appParams}
http://apps.container.com/${appName}#${appPath}?${appParams}
http://container.com/?app=${appName}&path=${appPath}&${appParams}
We could have a JS method and/or a RESTful method for returning the template, but the template would be assumed to be effectively permanent so apps wouldn't actually have to query it at runtime. That way they could build URLs on the server side.
You can't really make it permanent, because that would prevent the container from ever changing their url structure, which may become necessary for other reasons (such as domain name changes).
It's also quite possible that you'd have something like locale information in the url, e.g.:
apps.container.com/...
apps.container.cn/...
apps.container.co.uk/...
I don't think just adding the container domain to the template resolves this, because then you'd just need another API for getting the container domain.
There's also an issue with parameter naming. If the site has some parameters passed in the query string, and other parameters are passed to the gadget, you've got a conflict. Sites that have taken care to construct urls to get around this wouldn't be affected, but otherwise a parameter naming scheme would be necessary, or a function (REST / js) would be necessary to produce the final url.
I don't know why OpenSocial chose ${} but I don't see a reason for a
divergence from Joe's draft spec
http://www.ietf.org/internet-drafts/draft-gregorio-uritemplate-03.txt
I also want to add that in addition, the API server will provide a
service document to allow clients to discover the various endpoints
available. http://bitworking.org/projects/atom/draft-ietf-atompub-protocol-14.html#appdocs
Right now I'm assuming the three workspaces: people, activities and
app data, but if the app data store is not the right place to store
this info, maybe we could add another workspace with app urls.
Navigating these docs can be a little heavy weight so maybe we could
expose the methods we use to generate it for quicker json-rpc-like
access.
davep
Ok, so you're saying service docs don't work for dynamic web services,
only simple static publishing? I think they're specified rather
loosely and I haven't seen many non-trivial examples that would prove
what you're saying. In the absence of a specific description format
like OpenSearch, what about a WADL file?
Sorry this is getting a little off topic from the proposed URI template RPC.
davep
/**
* Returns a url for navigating to the current app on the given
surface. Will include the path and parameters in the url. Similar to
requestNavigateTo.
*
* @param {gadgets.views.View} view The view to navigate to
* @param {String} path The path to navigate to
* @param {Map.<String, String>} opt_params Parameters to pass to the
* gadget after it has been navigated to on the surface
*
* @return {String} a url that can be used by the gadget
* @member opensocial
*/
gadgets.views.getUrlFor = function(surface, path, opt_params) {};
So, for 0.8 would we rather:
1. Add a method to fetch a url template from the container. This would
be what Graham proposed (except it might fit better on the
gadgets.views object instead of opensocial) or
2. Add a method to get a url for a given surface, path and set of
params. (The method right above)
Please vote or suggest other proposals.
Thanks!
- Cassie
Im also a tentative +1 here but I think some details need to be worked out before committing
Is the existing mechanism of extracting parentURL from the URL params using the gadgets.util fine for app developers to access the 'path' variable information?
Which id's are we talking about here. This may be a problem unique to Orkut but we have used a different id space for opensocial than the one we use for our URLs, open social owner id != page owner id. I'm loath to propose modifying the spec to include a NAVIGATION_ID to resolve this issue but...
'params' are currently exposed as JSON objects in gadgets js, are we proposing changing this to query encoded and have apps accommodate the associated change in structure this implies?
What rules do we expect containers to enforce about the naming conventions of params. Most containers are likely to have a diverse though small set of always reserved params. Does the spec need to say something about this?
On Fri, Apr 25, 2008 at 9:54 AM, Louis Ryan <lr...@google.com> wrote:Im also a tentative +1 here but I think some details need to be worked out before committing
Is the existing mechanism of extracting parentURL from the URL params using the gadgets.util fine for app developers to access the 'path' variable information?
That's an implementation specific detail, so by definition it can't be "fine" unless we standardize it (and that's just a different class of badness :)).
Which id's are we talking about here. This may be a problem unique to Orkut but we have used a different id space for opensocial than the one we use for our URLs, open social owner id != page owner id. I'm loath to propose modifying the spec to include a NAVIGATION_ID to resolve this issue but...
'params' are currently exposed as JSON objects in gadgets js, are we proposing changing this to query encoded and have apps accommodate the associated change in structure this implies?
What rules do we expect containers to enforce about the naming conventions of params. Most containers are likely to have a diverse though small set of always reserved params. Does the spec need to say something about this?
This seems like asking for trouble. There should be standard ways to get access to params (such as we see with view parameters), but standardizing how they are passed will make things very difficult for containers, especially those based on limited application frameworks that refuse to accept doing things any way other than the one that they like.
<XRDS xmlns="xri://$xrds">
<XRD xmlns:simple="http://xrds-simple.net/core/1.0" xmlns="xri://$XRD*($v*2.0)" version="2.0">
<Type>xri://$xrds*simple</Type>
<Service>
<Type>http://opensocial.org/discovery/people</Type>
<URI-Template>http://my-sn-apis.com/resource/people/{ownerid}/{groupid}/{personid}</URI>
</Service>
</XRD>
</XRDS>
> >>>http://container.com/apps/${name}/${owner}/${path}?${params} <http://container.com/apps/$%7Bname%7D/$%7Bowner%7D/$%7Bpath%7D?$%7Bparams%7D> <http://container.com/apps/$%7Bname%7D/$%7Bowner%7D/$%7Bpath%7D?$%7Bpa...>
> >>>http://apps.container.com/${name}#${path}?${params} <http://apps.container.com/$%7Bname%7D#$%7Bpath%7D?$%7Bparams%7D> <http://apps.container.com/$%7Bname%7D#$%7Bpath%7D?$%7Bparams%7D>
> >>>http://container.com/?app=${name}&owner=${owner}&path=${path}&${params} <http://container.com/?app=$%7Bname%7D&owner=$%7Bowner%7D&path=$%7Bpath%7D&$%7Bparams%7D> <http://container.com/?app=$%7Bname%7D&owner=$%7Bowner%7D&path=$%7Bpat...>
On Wed, Apr 30, 2008 at 05:52:06PM -0700, Lou Moore wrote:
> +1 on all of those, we¹d like to see this in 0.8 too
>
>
> On 4/30/08 5:22 PM, "Graham Spencer" <g...@google.com> wrote:
>
> > I would be happy with all of Louis's +1s.
> >
> > We've gotten strenuous feedback from developers that they really need this, so
> > I'm eager to get it into 0.8 -- if people agree, can we get more +1s? Thanks!
> >
> >
> >>>>>>>>>> <http://container.com/?app=$%7Bname%7D&amp;owner=$%7Bowner%7D&
> >>>>>>>>>> ;amp;path=$%7Bpath%7D&amp;$%7Bparams%7D>
> >>>>>>>>>> <http://container.com/?app=$%7Bname%7D&owner=$%7Bowner%7D&path=$%7Bpa
> >>>>>>>>>> t...>
> >>>>>>>>>> <http://container.com/?app=$%7Bname%7D&owner=$%7Bowner%7D&pat
> You received this message because you are subscribed to the Google Groups "OpenSocial and Gadgets Specification Discussion" group.
> To post to this group, send email to opensocial-an...@googlegroups.com
> To unsubscribe from this group, send email to opensocial-and-gadg...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/opensocial-and-gadgets-spec?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
--
Paul Lindner ||||| | | | | | | | | |
lin...@inuus.com
On Wed, May 21, 2008 at 11:40 AM, Louis Ryan <lr...@google.com> wrote: