Hi everybody,

I'm currently trying to implement OpenSocial/Shindig within a project and need to provide a good possibility for the user to store the information he changed within a gadget.

I've looked up the web for some examples and even found some, although they were all using either a Cookie-based store (just like the server already provides) or some PHP/JS construction, that doesn't really fit into my scenario.

Let me shortly describe my actual facts: The site, I'd like to have Shindig implemented in is 99% pure JavaScript which communicates via XmlHttpRequests through a REST-Interface to my back-end-Tomcat-WebApp. For authentication/session-handling, the site uses OAuth. All WebApps (front-end containing the JS site, back-end and Shindig) are reachable through the very same domain.

Now, within my JS-front-end (the site), I've already built-up an own framework to handle calls into the back-end/database, which I would also like to use within Shindig's UserPrefs-store. From what I've read and hopefully understood, the UserPrefs-store has to be contained within Shindig's data-directory and is linked by Shindig into the gadget-HTML by Shindig himself - right?

So, if I would want to use the code I'm already using within the JavaScript front-end, I would need to make the UserPrefs-store (let's call that store.js) add JavaScript-links into the gadget's HTML dynamically, so that the methods within the store.js can call the methods I'm already using within my front-end - right? The store.js- methods would than just take the OAuth-session-token, that's saved as Cookie in the user's browser and run their own requests into the back- end/database.

My actual question is: Is this really the way how things should be done, or are there any other, less complex ways that would fit better into my scenario? How should I implement my UserPref-store so that it is reachable from within the gadget without duplicating a lot of JavaScript?

Thank you in advance,

Marius.
--
Marius Moise
Systems Administration

inovex GmbH
Karlsruher Straße 71
D-75179 Pforzheim
Tel: 07231 31 91 0
Fax: 07231 31 91 91
[email protected]
www.inovex.de

Sitz der Gesellschaft: Pforzheim
AG Mannheim, HRB 502126
Geschäftsführer: Stephan Müller

Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to