>-----Original Message----- >From: Ross Gardler [mailto:[email protected]] >Sent: Thursday, December 06, 2012 5:54 AM >To: dev >Subject: Host Navigation API > >Does it make sense to implement a feature that provides an API to allow a >widget to instruct a host platform to take some navigation action? Does >such an API already exist?
I don't know about in W3C widgets; but this pattern is very common in OpenSocial Gadgets. OpenSoical has a whole RPC layer that it uses to marshal requests between the widget and its container. In my desire to see OpenSocial gadget functionality align more with W3C, I could definitely envision the case where you would want to start to include this capability in W3C widgets. > >Imagine this use case: > >I have a dashboard widget that provides summary information about activity >on a Drupal site. It is displayed in the right column of all pages on the >site. From this dashboard I want to be able to control what is displayed in >the main area of the page. I could hard code this but it would mean the >widget needs to be aware that it is running in a Drupal site. What if I >want to use it in a WordPress site or a Windows 8 application? > >My proposal is to implement a Host Navigation API. This API would allow the >widget to add a listener for touch events and communicate these to the host >application which would then take appropriate action. For example, the API >might provide a navigateToPage(String source) which instructs the host to >navigate its main display to the indicated resource path. In OpenSocial this use case is part of the Actions Contributions. > >I believe that it would be possible to implement widgets in such a way that >they degrade gracefully if the feature is not present. For example a widget >could chose to display a popup with the requested page if the extension is >not provided. Therefore this feature, in many cases, could be an optional >one. +1 > >My main question is whether this seems like a sensible course of action. > >My secondary question is whether this is something that should be done here >in Wookie or whether this is out of scope. I'm doing the work over on >GItHub at the moment for a specific project but it seems to me like this >might be more broadly applicable. It would be interesting to see if we couldn't just use some of the same features from Shindig to make this happen in Wookie Widgets. > >Ross
