On Wed, Jul 1, 2009 at 9:06 AM, Kevin Brown <e...@google.com> wrote: > On Wed, Jun 24, 2009 at 7:22 PM, Wang, Jeff (CTSI) <jeff.w...@ucsf.edu > >wrote: > > > Hi All, > > > > > > > > I'm a relative newbie to Shindig, and I've worked through some of the > > examples and created some sample gadgets. But I've got some questions > > with regard to more useful deployments below. Feel free to tell me to > > RTFM, or point me to a more appropriate mailing list. (There doesn't > > seem to be a shindig-users list?) > > > > > > > > 1) Non-trivial datasources > > > > Dave Johnson and Chico Charlesworth have pretty decent run throughs with > > Shindig and custom data sources. Basically, we need to override > > PersonService, AppDataService, and ActivityService. and associate via > > Guice. Message service is not necessary for OpenSocial compliance. > > Have I missed anything? > > > That's pretty much it. Implement those 3 and you're good to go as far as > the > spec is concerned. > > > > > > > > > > > > 2) Gadget deployment > > > > a) For a given gadget written locally, is it better to use the > > <Shindig>/gadgets/files/... format, or expose the xml spec as an URL, > > and refer to it in the <Shindig>/gadgets/ifr... format? > > > I don't really know what this means. What is the > <Shindig>/gadgets/files/... > format? > > /gadgets/ifr is the location where gadgets are rendered. Where you choose > to > host gadgets themselves is up to you. Most containers simply allow an > author > to register a gadget in some sort of directory, but leave the gadget spec > itself on developer-controlled servers. > > Shindig just assumes that the "url" parameter to /gadgets/ifr points to > some > valid url that can be loaded through the GadgetSpecFactory and > MessageBundleFactory. By default these just perform HTTP fetching through > the HttpFetcher interface, which is a thin layer on top of the Apache > commons HttpClient library. > > > > b) For a given external gadget, say, the ToDo example. Is it better to > > refer to the external URL, or to download it and save it locally to > > avoid potentially unwanted version update? Would that be rude to the > > gadget developer? > > > Not just rude, it might have legal consequences. You should generally avoid > doing anything with someone else's creation unless you're sure that you're > using it in a manner that the author consented to. > > > > c) I see examples of multiple gadgets on the same page, but what about > > dynamic # of gadgets as with iGoogle or something like that? You'd > > pretty much have to generate an array of specurls right? Does someone > > have an example for that? > > > Embedding multiple gadgets onto a single page isn't any different from > embedding a single gadget as far as Shindig goes. How you lay the gadgets > out is entirely up to you. There is a somewhat crufty and > not-quite-fully-supported endpoint in the gadget renderer at > /gadgets/metadata that supports batching to get metadata for generating the > appropriate iframes. An example of using this method is at > > > http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/container/sample-metadata.html?view=co&content-type=text%2Fplain > > > > > > > > > > > > 3) Authentication > > > > Shindig does a pretty good job of integrating OAuth into itself, but > > what about non-OAuth based 3-legged authentication? Working in the > > education world, it seems that Shibboleth is becoming the accepted > > standard. What extensions do I need to write a Shibboleth adaptor? > > > You can implement anything you want, but opensocial only deals with oauth. > For inbound requests, a custom AuthenticationHandler implementation is > needed. For outbound requests, you can plug your auth scheme into a custom > RequestPipeline implementation. > > > > > > > > > > > > Other alternatives are to try to limit ourselves to un-authorized > > gadgets, or to use third party cookies, which has problems in IE and > > Safari. > > > > > > > > 4) Shindig Deployment > > > > > > > > So I have code written, Guice/Spring xmls modified, a new gadget, and > > removed the samples. Is there a good way to create the War, or do I > > have to package it myself? The maven target obviously take the entire > > tree, and I'd like to add/subtract stuff from there. > > > I'd recommend building your own war if you need to use a war. The war > should > contain: > > - the 4 shindig jars (gadgets, social api, common, and features > [javascript]) > - your code > - any custom configuration (web.xml, properties files, etc.) > > The maven-war-plugin (http://maven.apache.org/plugins/maven-war-plugin/) can be customized in many ways to accommodate your needs Jeff. The dependencies needed are easy to add using the <dependencies> section. I've found the 1.1 (SNAPSHOT) version of Shindig in this maven repository: https://repository.apache.org/. Look at the pom.xml files for each dependency for information on setup of groupId, ArtifactId and version information in your <dependencies> section.
When it comes to filtering other resources I would look at the "Adding and filtering external web resources" section ( http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html ). </viggo> > > > > > > > > > > > thanks for any help > > > > Jeff > > > > >