You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rave.apache.org by Richard Kettelerij <ri...@gmail.com> on 2012/03/09 00:15:49 UTC

[DISCUSS] Uploading widgets

Hi list,

I'm working with Rave for a few months now and was thinking about the following new feature: ability to uploading widgets to the portal. Currently widgets can only be added by URL. This raises the question, where do you host your widgets? One can think of various solutions but having a simple upload function available might come in handy.

Some thoughts:
- W3C widget can be uploaded as .wgt file
- OpenSocial widget can be uploaded as plain XML file, or as a zip file in case additional resources (CSS, JS) are required.
- Rave contains a controller/servlet to serve the widget files, optionally allow placeholder replacements.
- Rave treats uploaded widgets like any other widget, meaning a reference (e.g. http://localhost:8080/widget-repo/mywidget.xml) to the uploaded widget is stored in the widget database table.

What do you think? 

PS: I noticed a recent discussion about widget catalogs. While interesting, I expect a catalog to be a more heavy-weight solution. To be clear I'm proposing a simple upload / widget hosting solution.

Regards,
Richard

Re: [DISCUSS] Uploading widgets

Posted by Scott Wilson <sc...@gmail.com>.
On 9 Mar 2012, at 09:00, Jasha Joachimsthal wrote:

> Hi Richard,
> 
> hosting widgets is something we definitely need. We had this discussion
> earlier (last summer) but haven't had the time to actually build the
> functionality. There is already an issue for it:
> https://issues.apache.org/jira/browse/RAVE-251
> Any input is welcome!

+1

> 
> Jasha Joachimsthal
> 
> Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
> US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll free)
> 
> www.onehippo.com
> 
> 
> On 9 March 2012 00:15, Richard Kettelerij <ri...@gmail.com>wrote:
> 
>> Hi list,
>> 
>> I'm working with Rave for a few months now and was thinking about the
>> following new feature: ability to uploading widgets to the portal.
>> Currently widgets can only be added by URL. This raises the question, where
>> do you host your widgets? One can think of various solutions but having a
>> simple upload function available might come in handy.
>> 
>> Some thoughts:
>> - W3C widget can be uploaded as .wgt file

Paul and I were discussing this the other day - whether to upload a .wgt file or enter a URL to where a .wgt can be downloaded. I guess offering both options is probably best.

>> - OpenSocial widget can be uploaded as plain XML file, or as a zip file in
>> case additional resources (CSS, JS) are required.

Funnily enough I remember a conversation at the OpenSocial event in Utrecht about using W3C .wgt files to package OpenSocial gadgets for just this purpose.

And then a little while ago I saw the guys from SAP were generating OpenSocial .xml URLs from Wookie to embed W3C Widgets ...

Standards, eh?

>> - Rave contains a controller/servlet to serve the widget files, optionally
>> allow placeholder replacements.
>> - Rave treats uploaded widgets like any other widget, meaning a reference
>> (e.g. http://localhost:8080/widget-repo/mywidget.xml) to the uploaded
>> widget is stored in the widget database table.
>> 
>> What do you think?
>> 
>> PS: I noticed a recent discussion about widget catalogs. While
>> interesting, I expect a catalog to be a more heavy-weight solution. To be
>> clear I'm proposing a simple upload / widget hosting solution.

Yes, there are two discussions there really - about separating out the underlying repository (which wouldn't affect uploading particularly), and about connecting with external marketplaces/stores/whatever. For the latter you could just do copy-and-paste of the {download URL for the .wgt/gadget.xml URL} or something more integrated, but you still need a facility to let users upload widgets directly.

(Actually I can see  a future UC of portals where there is a policy that you can only install widgets from a particular store, either enterprise-wide or some sort of official or partner external service - for example provided as part of a service & support agreement - rather than by direct uploading, but no need to worry about that yet I think.)

>> 
>> Regards,
>> Richard


Re: [DISCUSS] Uploading widgets

Posted by Jasha Joachimsthal <j....@onehippo.com>.
Hi Richard,

hosting widgets is something we definitely need. We had this discussion
earlier (last summer) but haven't had the time to actually build the
functionality. There is already an issue for it:
https://issues.apache.org/jira/browse/RAVE-251
Any input is welcome!

Jasha Joachimsthal

Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll free)

www.onehippo.com


On 9 March 2012 00:15, Richard Kettelerij <ri...@gmail.com>wrote:

> Hi list,
>
> I'm working with Rave for a few months now and was thinking about the
> following new feature: ability to uploading widgets to the portal.
> Currently widgets can only be added by URL. This raises the question, where
> do you host your widgets? One can think of various solutions but having a
> simple upload function available might come in handy.
>
> Some thoughts:
> - W3C widget can be uploaded as .wgt file
> - OpenSocial widget can be uploaded as plain XML file, or as a zip file in
> case additional resources (CSS, JS) are required.
> - Rave contains a controller/servlet to serve the widget files, optionally
> allow placeholder replacements.
> - Rave treats uploaded widgets like any other widget, meaning a reference
> (e.g. http://localhost:8080/widget-repo/mywidget.xml) to the uploaded
> widget is stored in the widget database table.
>
> What do you think?
>
> PS: I noticed a recent discussion about widget catalogs. While
> interesting, I expect a catalog to be a more heavy-weight solution. To be
> clear I'm proposing a simple upload / widget hosting solution.
>
> Regards,
> Richard

Re: [DISCUSS] Uploading widgets

Posted by Paul Sharples <p....@bolton.ac.uk>.
On 09/03/2012 09:21, Ross Gardler wrote:
> On 8 March 2012 23:15, Richard Kettelerij<ri...@gmail.com>  wrote:
>> Hi list,
>>
>> I'm working with Rave for a few months now and was thinking about the following new feature: ability to uploading widgets to the portal. Currently widgets can only be added by URL. This raises the question, where do you host your widgets? One can think of various solutions but having a simple upload function available might come in handy.
>>
>> Some thoughts:
>> - W3C widget can be uploaded as .wgt file
>> - OpenSocial widget can be uploaded as plain XML file, or as a zip file in case additional resources (CSS, JS) are required.
>> - Rave contains a controller/servlet to serve the widget files, optionally allow placeholder replacements.
>> - Rave treats uploaded widgets like any other widget, meaning a reference (e.g. http://localhost:8080/widget-repo/mywidget.xml) to the uploaded widget is stored in the widget database table.
>>
>> What do you think?
> Getting W3C widgets into Wookie (which provides the W3C widget engine
> for Rave) is already supported API (see
> http://incubator.apache.org/wookie/docs/api.html). However, this does
> not automatically put the widget into the Rave widget store. Either
> Rave needs to provide an API to allow this and pass it through to
> Wookie or Rave can be configured to query the Wookie server and put
> all widgets it finds into the the store (I'm assuming it doesn't do
> this at present, it didn't do last time I looked - some time ago).

Although wookie is now bundled with rave, the widgets that are found in 
a default install of wookie do not appear in raves store. (and there is 
no way of adding them unless you tweak the database) As an *interim* I 
created this patch (https://reviews.apache.org/r/4103/) which uses the 
wookies advert service to allow a user to import widgets from wookie to 
rave using the "add widget" page.  This was meant as a short term fix 
for rave & wookie 0.9.2.  For this fix, the workflow is still to upload 
new widgets using wookie directly, then in rave you can add the widget 
to the store. This workflow is obviously different to how rave+shindig 
import widgets.  To achieve a similar workflow with rave+wookie meant 
that there would have to be some new wiring put in place within wookies 
REST api. (which 0.9.2 did not yet have)

My idea was to update the wookie REST api for 0.10.0 so that POSTing a 
widget (*.wgt) file allows the metadata (config.xml) to be sent back as 
response.  (See https://issues.apache.org/jira/browse/WOOKIE-324) This 
would mean that the workflow of importing a w3c widget into rave could 
be made a little more similar to how adding a gadget works.

(I'd then rewrite the import/add w3c widget patch for rave & submit it 
back when wookie-0.10.0 is released.)

Paul

> Rave already hosts W3C Widgets via the embedded Wookie server. But I'm
> not sure how complete the integration is at this point so there is
> likely still some work to do.
>
> Ross


Re: [DISCUSS] Uploading widgets

Posted by Richard Kettelerij <ri...@gmail.com>.
On Fri, Mar 9, 2012 at 11:43 AM, Scott Wilson <
scott.bradley.wilson@gmail.com> wrote:

>
> Paul has submitted a patch for review that allows browsing Widgets already
> in Wookie from the Rave store to add them, however when we talked recently
> about it we weren't sure if this was the right workflow for Rave - I think
> uploading to Rave, and then Rave POSTing the Widget to Wookie is perhaps a
> more sensible flow from a Rave point of view.
>
>
I also think that Rave POSTing the widget to Wookie makes more sense.

I'll just go ahead and build an upload facility in Rave to upload widgets
and register those in Rave. For now I'll focus on OpenSocial gadgets since
that's what I'm using. It wouldn't be too hard to add support for W3C
widgets later on....

Re: [DISCUSS] Uploading widgets

Posted by Scott Wilson <sc...@gmail.com>.
On 9 Mar 2012, at 09:21, Ross Gardler wrote:

> On 8 March 2012 23:15, Richard Kettelerij <ri...@gmail.com> wrote:
>> Hi list,
>> 
>> I'm working with Rave for a few months now and was thinking about the following new feature: ability to uploading widgets to the portal. Currently widgets can only be added by URL. This raises the question, where do you host your widgets? One can think of various solutions but having a simple upload function available might come in handy.
>> 
>> Some thoughts:
>> - W3C widget can be uploaded as .wgt file
>> - OpenSocial widget can be uploaded as plain XML file, or as a zip file in case additional resources (CSS, JS) are required.
>> - Rave contains a controller/servlet to serve the widget files, optionally allow placeholder replacements.
>> - Rave treats uploaded widgets like any other widget, meaning a reference (e.g. http://localhost:8080/widget-repo/mywidget.xml) to the uploaded widget is stored in the widget database table.
>> 
>> What do you think?
> 
> Getting W3C widgets into Wookie (which provides the W3C widget engine
> for Rave) is already supported API (see
> http://incubator.apache.org/wookie/docs/api.html). However, this does
> not automatically put the widget into the Rave widget store. Either
> Rave needs to provide an API to allow this and pass it through to
> Wookie or Rave can be configured to query the Wookie server and put
> all widgets it finds into the the store (I'm assuming it doesn't do
> this at present, it didn't do last time I looked - some time ago).
> 
> Rave already hosts W3C Widgets via the embedded Wookie server. But I'm
> not sure how complete the integration is at this point so there is
> likely still some work to do.

Paul has submitted a patch for review that allows browsing Widgets already in Wookie from the Rave store to add them, however when we talked recently about it we weren't sure if this was the right workflow for Rave - I think uploading to Rave, and then Rave POSTing the Widget to Wookie is perhaps a more sensible flow from a Rave point of view. 

In any case in 0.10 we've just altered the Wookie REST API to return the metadata XML in the response to a widget upload POST so that Rave could do a one-step upload via Wookie without requiring users to enter any metadata manually.

> 
> Ross


Re: [DISCUSS] Uploading widgets

Posted by Ross Gardler <rg...@opendirective.com>.
On 8 March 2012 23:15, Richard Kettelerij <ri...@gmail.com> wrote:
> Hi list,
>
> I'm working with Rave for a few months now and was thinking about the following new feature: ability to uploading widgets to the portal. Currently widgets can only be added by URL. This raises the question, where do you host your widgets? One can think of various solutions but having a simple upload function available might come in handy.
>
> Some thoughts:
> - W3C widget can be uploaded as .wgt file
> - OpenSocial widget can be uploaded as plain XML file, or as a zip file in case additional resources (CSS, JS) are required.
> - Rave contains a controller/servlet to serve the widget files, optionally allow placeholder replacements.
> - Rave treats uploaded widgets like any other widget, meaning a reference (e.g. http://localhost:8080/widget-repo/mywidget.xml) to the uploaded widget is stored in the widget database table.
>
> What do you think?

Getting W3C widgets into Wookie (which provides the W3C widget engine
for Rave) is already supported API (see
http://incubator.apache.org/wookie/docs/api.html). However, this does
not automatically put the widget into the Rave widget store. Either
Rave needs to provide an API to allow this and pass it through to
Wookie or Rave can be configured to query the Wookie server and put
all widgets it finds into the the store (I'm assuming it doesn't do
this at present, it didn't do last time I looked - some time ago).

Rave already hosts W3C Widgets via the embedded Wookie server. But I'm
not sure how complete the integration is at this point so there is
likely still some work to do.

Ross