Hi Mike,

I don't think there is any documentation on the templating feature, nor are
there likely any sample gadgets that take advantage of it since it is a
container-level feature.

I did find this JIRA [1] which addresses many of your concerns.  Paul made
a good point in the commends that the templating allows for caching of the
metadata request even if the preference values change, and that it also
relies on the JavaScript container to do the substitution.  There is a hook
into the common container so that a container implementation can inject its
own preferences.  See SHINDIG-1568 for a pointer [2].

I think there are two issues here:
1) The common container should have some mechanism for user preference
replacement out of the box (at least for default pref values).
2) Until #1 is in place, the default should be to have templating off by
default

Any thoughts from the dev list?

Thanks,
-Stanton

[1] https://issues.apache.org/jira/browse/SHINDIG-1465
[2] https://issues.apache.org/jira/browse/SHINDIG-1568


On Thu, Aug 22, 2013 at 12:08 PM, Mike Pawlowski <mpaw...@ca.ibm.com> wrote:

>
> Hi Henry, Stanton,
>
> Sorry for the late reply. I wasn't subscribed properly to the shindig-dev
> mailing list.
>
> >>  so looks like this is regression from 2.5.0 beta6 release?
>
> Unfortunately, I'm not sure if this issue is or is not applicable to
> releases prior to 2.5.0 Beta 6; since,
> our team initially started with integrating the Beta 6 version of Shindig
> into our new product.
>
> >> this worked in the old shindig.container thought, right?
>
> Correct.
> I just verified in Shindig 2.5.0 (final) that the shindig.container works
> as expected but the common.container
> does not work as expected using a build with the preference templating
> feature enabled (the default).
>
> Note: It appears that the shipped shindig.container sample was broken in
> 2.5.0 (final) when it was moved to the
> "deprecated"
> path: /containers/deprecated/samplecontainer/samplecontainer.html
> As a result, I had to temporarily regress our OpenSocial gadget container
> to use the old shindig.container for
> comparison / testing purposes (against the shipped common.container
> sample).
>
> >> I don't recall why the default is to use templating. Maybe that should
> change.
> >> (4) Should Shindig be built by default with the preference templating
> feature disabled
>
> Would you like me to create a corresponding JIRA issue to track this issue?
>
> >> RE: Questions (1) & (2) below
>
> I'm guessing there isn't any information or examples readily available for
> user consumption regarding the preference templating feature yet.
>
>
> Thanks for the feedback thus far,
>
> Mike
>
>
>
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>
> On Fri, 16 Aug 2013 19:31:23 GMT
>
>
> I don't think this is a regression.  Mike, this worked in the old
> shindig.container thought, right?
>
> I don't recall why the default is to use templating.  Maybe that should
> change.  Templating by default is only useful if the container is able to
> replace the templated values, which in the default configuration is not the
> case.
>
>
> On Fri, Aug 16, 2013 at 2:54 PM, Henry Saputra
> <henry.sapu...@gmail.com>wrote:
>
> > Hi Mike, so looks like this is regression from 2.5.0 beta6 release?
> >
> > - Henry
> >
> >
> > On Fri, Aug 16, 2013 at 9:27 AM, Mike Pawlowski <mpaw...@ca.ibm.com>
> > wrote:
> >
> > >
> > >
> > > Hi,
> > >
> > > I'm experiencing an issue with the preference templating feature in
> > Shindig
> > > and have a few questions regarding it.
> > >
> > > Environment
> > >
> > > * Shindig 2.5.0 (final) - Java version
> > > * Using common container (osapi.container)
> > > * Cross-domain deployment
> > >    => i.e. OpenSocial gadget containers hosted from one domain and the
> > > OpenSocial gadget renderer hosted from another domain
> > >    => e.g.
> > >          - Examples application (OS gadget container):
> > > http://localhost:9081/examples/gadgets
> > >          - Shindig application (OS gadget renderer):
> > > http://localhost:9082/rpc, http://localhost:9082/gadgets/ifr, etc.
> > >    => Got working via minor Shindig modification & CORS Java servlet
> > > filters
> > >          - See issue for more details:
> > > https://issues.apache.org/jira/browse/SHINDIG-1927
> > >
> > > Problem
> > >
> > > Several external 3rd-party gadgets fail to render properly using the
> > common
> > > container (don't think it was an issue for
> > > the deprecated shindig.container in the above environment using Shindig
> > > 2.5.0 Beta 6)
> > > e.g.
> > > (1) The Daily Puppy - http://dailypuppy.com/gmod/thedailypuppy.xml
> > > (2) NYTimes.com Top Stories -
> > > http://widgets.nytimes.com/packages/html/igoogle/topstories.xml
> > > (3) YouTube: http://www.gstatic.com/ig/modules/youtube/v3/youtube.xml
> > > (4) Hamster:
> > >
> > >
> >
>
> http://hosting.gmodules.com/ig/gadgets/file/112581010116074801021/hamster.xml
>
> > >
> > > These gadgets are used as part of our sanity test suites.
> > >
> > > See issue for more details
> > > https://issues.apache.org/jira/browse/SHINDIG-1926
> > >
> > > Solution (Verified)
> > >
> > > Disable preference templating feature by adding
> > > shindig.urlgen.use-templates-default=false to shindig.properties and
> > > rebuilding Shindig
> > > (Recommended by Ryan). By default the common container uses templates
> for
> > > preferences.
> > >
> > > Questions
> > >
> > > (1) Is there any documentation on the preference templating feature
> > > describing it's usage & behaviour?
> > >       => e.g. Wiki documents, API doc, specification references, etc.
> > >
> > > (2) Are there any third-party (external) gadgets or sample (internal)
> > > gadgets that make use of the "templates" feature?
> > >      => i.e. Examples demonstrating how to use this feature
> > >
> > > (3) Will disabling the shindig.urlgen.use-templates-default option
> > > adversely affect the rendering of other gadgets using the common
> > container?
> > >
> > > (4) Should Shindig be built by default with the preference templating
> > > feature disabled (i.e. "shindig.urlgen.use-templates-default=false")?
> > >      => e.g. Since, it causes regressions in a number of external
> > 3rd-party
> > > gadgets
> > >      => I'm not sure what the commonality is between these gadgets that
> > > causes rendering issues
> > >
> > >
> > > Thanks,
> > >
> > > Mike
> > >
> >
>
>

Reply via email to