rave-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Franklin, Matthew B." <mfrank...@mitre.org>
Subject Re: Embedded experiences across widget types
Date Fri, 22 Jun 2012 17:11:26 GMT
On 6/19/12 10:33 AM, "Scott Wilson" <scott.bradley.wilson@gmail.com> wrote:

>It was great seeing the Embedded experiences demo at the Rave Hackleton
>last week; this is a proposed feature for OpenSocial whereby widgets can
>be embedded into activity streams and other kinds of feeds with some
>context data, and looks like a really nice feature for users.
>I had a look at the spec[1], and it actually wouldn't need any new code
>in Wookie to work fine for W3C Widgets too, and minimal additions to the
>W3C provider in Rave.
>E.g., an embed referencing a widget identifier rather than OpenSocial XML
>file looks like this:
>	<gadget>http://wookie.apache.org/widgets/youtube</gadget>
>	<context>9gW2YVBrNVA</context>
>In this case, we want the YouTube widget to be embedded, playing the
>specified movie.
>To render, we can just push the context into the widget using widget
>preferences; in WookieWidgetService in rave-w3c-provider it would look
>like this:
>    private W3CWidget getWidgetForViewer(Widget widget, String
>sharedDataKey, User viewer, String eeContextData){
>       try {
>            connectorService = getWookieConnectorService(wookieServerUrl,
>wookieApiKey, sharedDataKey);
>            org.apache.wookie.connector.framework.User user = new
>me()), viewer.getUsername());
>            connectorService.setCurrentUser(user);
>            WidgetInstance instance =
>	    // Now push the context data in for embedded experiences//
>            connectorService.setPropertyForInstance(instance, false,
>"org.opensocial.ee.context", eeContext);
>            return createWidget(instance);
>The Widget can then call
>widget.preferences.getItem("org.opensocial.ee.context") to check for the
>movie id.
>So if/when Rave does add support for embedded experiences, we can do so
>across widget types pretty trivially.

Cool.  The only question I have is how would the rave javascript know
whether or not to render this as an OS gadget or wookie?

>[1] http://docs.opensocial.org/display/OSD/Embedded+Experiences

View raw message