You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Robert Peterson <ju...@gmail.com> on 2010/03/05 22:52:50 UTC

UserPrefsDialog results in jsonp call to http://gmodules.com/ig?

We are using the default container that comes with *
shindig-server-1.1-BETA5-incubating.war*. When we click on the "settings"
link for a gadget, the browser makes a call similar to the following:

http://gmodules.com/ig/gadgetsettings?mid=0&output=js&url=http://juzzam.org:8888/gadget/specification.xml

Is this normal? Do we have something misconfigured?

Thanks,
Robert

Re: UserPrefsDialog results in jsonp call to http://gmodules.com/ig?

Posted by Paul Lindner <li...@inuus.com>.
[responding waaay after the fact...]

The metadata call is one of the few that does support jsonp.   If you've
been following along you'll see that the JSON-RPC endpoint supports it now
and I have a patch review up for REST support.

Next step is to convert the metadata servlet into a proper 'Apps' handler
that can be used with JSON-RPC and/or REST, eliminating one more custom
piece of code/logic.

On Tue, Mar 9, 2010 at 1:28 AM, Tim Wintle <ti...@teamrubber.com>wrote:

> On Mon, 2010-03-08 at 14:25 -0800, Paul Lindner wrote:
> >
> > I'd love to see someone take this patch and make it generic..  If I
> > had some
> > spare cycles I'd do it myself...
>
> Unless I've missed something, it doesn't seem practical to have the
> option of building the user pref UI client side unless the metadata call
> supports JSONP or similar for X-domain metadata requests.
>
>
> I.e. for this patch to work the javascript gadget object must have been
> created with the correct user pref schema - which (as far as I know) can
> either be:
>
>  * Fetched from a container which already knows the user pref schema for
> that gadget (in which case it could have templated the form cheaply
> server-side).
>
>  * Fetched via a POST metadata request. (with X-domain issues
> surrounding this)
>
> We've used both of these techniques here - The server side technique is
> more customizable and IMO better, but it can't be used on static pages,
> and it either leads to a slight extra delay as the metadata request is
> made, or (if cached) to noticable data integrity errors if the gadget
> spec is updated in shindig's cache but not in the container's cache.
>
> The second technique requires a hidden gadget inserted onto the page
> which can make the metadata call (as it's on the same domain), and then
> use gadgets.rpc to send the schema back to the container.
>
> As I say, I may have missed an important call at some point that may
> have made this easier - but it seems allowing cross-domain access to the
> metadata call would be preferable in the second situation.
>
> Tim
>
>
>

Re: UserPrefsDialog results in jsonp call to http://gmodules.com/ig?

Posted by Tim Wintle <ti...@teamrubber.com>.
On Mon, 2010-03-08 at 14:25 -0800, Paul Lindner wrote:
> 
> I'd love to see someone take this patch and make it generic..  If I
> had some
> spare cycles I'd do it myself...

Unless I've missed something, it doesn't seem practical to have the
option of building the user pref UI client side unless the metadata call
supports JSONP or similar for X-domain metadata requests.


I.e. for this patch to work the javascript gadget object must have been
created with the correct user pref schema - which (as far as I know) can
either be:

 * Fetched from a container which already knows the user pref schema for
that gadget (in which case it could have templated the form cheaply
server-side).

 * Fetched via a POST metadata request. (with X-domain issues
surrounding this)

We've used both of these techniques here - The server side technique is
more customizable and IMO better, but it can't be used on static pages,
and it either leads to a slight extra delay as the metadata request is
made, or (if cached) to noticable data integrity errors if the gadget
spec is updated in shindig's cache but not in the container's cache.

The second technique requires a hidden gadget inserted onto the page
which can make the metadata call (as it's on the same domain), and then
use gadgets.rpc to send the schema back to the container.

As I say, I may have missed an important call at some point that may
have made this easier - but it seems allowing cross-domain access to the
metadata call would be preferable in the second situation.

Tim



Re: UserPrefsDialog results in jsonp call to http://gmodules.com/ig?

Posted by Paul Lindner <li...@inuus.com>.
I'd love to see someone take this patch and make it generic..  If I had some
spare cycles I'd do it myself...


On Fri, Mar 5, 2010 at 5:01 PM, Robert Peterson <ju...@gmail.com>wrote:

> This answers my question:
> http://issues.apache.org/jira/browse/SHINDIG-1188
>
> For our project, we will eventually need list support and are not thrilled
> about requiring a javascript library, but thank goodness for this patch.
>
>
> On Fri, Mar 5, 2010 at 3:52 PM, Robert Peterson <juzzam.shindig@gmail.com
> >wrote:
>
> > We are using the default container that comes with *
> > shindig-server-1.1-BETA5-incubating.war*. When we click on the "settings"
> > link for a gadget, the browser makes a call similar to the following:
> >
> >
> >
> http://gmodules.com/ig/gadgetsettings?mid=0&output=js&url=http://juzzam.org:8888/gadget/specification.xml
> >
> > Is this normal? Do we have something misconfigured?
> >
> > Thanks,
> > Robert
> >
>

Re: UserPrefsDialog results in jsonp call to http://gmodules.com/ig?

Posted by Robert Peterson <ju...@gmail.com>.
This answers my question:
http://issues.apache.org/jira/browse/SHINDIG-1188

For our project, we will eventually need list support and are not thrilled
about requiring a javascript library, but thank goodness for this patch.


On Fri, Mar 5, 2010 at 3:52 PM, Robert Peterson <ju...@gmail.com>wrote:

> We are using the default container that comes with *
> shindig-server-1.1-BETA5-incubating.war*. When we click on the "settings"
> link for a gadget, the browser makes a call similar to the following:
>
>
> http://gmodules.com/ig/gadgetsettings?mid=0&output=js&url=http://juzzam.org:8888/gadget/specification.xml
>
> Is this normal? Do we have something misconfigured?
>
> Thanks,
> Robert
>