views:

71

answers:

1

hello, i run a social networking site written in asp.net and would like to open it to developers using the OpenSocial APIs. I have read information on opensocial.org as well as google's opensocial page and have a basic idea what it takes but still there is a lot of info missing to even get started.

I know i gotta provide RESTful API as well as JavaScript API, authenticating using OAuth methods. Does my container has to provide all 3: JSON, XML, and AtomPub representations of data?

I found Shindig but it runs under Apache, i need something for IIS. Are there any libraries that i could use as a base for my APIs to save time? Is it even recommended to write the entire container from scratch?

thanks

A: 

The specification requires that you provide JSON and Atom for all web services, and XML for people calls.

For a .NET implementation, there is a port of Shindig called pesta that supports the OpenSocial 0.8 specification but it relies on an IKVM version of Google Caja (important for gadget security). However, it has not seen an active development in awhile and does not seem to have wide spread use.

I certainly would not recommend writing the container from scratch. Between both Apache Shindig and Google Caja, you are looking at nearly half a million lines of code. If you are required to run under IIS, I would consider running the PHP version of Shindig under IIS. If not, consider using Shindig as a gadget container under a J2EE application server. Since all the API methods allow you to supply your own interfaces, just have an implementation that delegates API calls to a .NET service via a message queue, Thrift, etc. That way you can implement all the business logic in a language you are comfortable with. Shindig can render gadgets to an iframe so you can still write your main site with ASP.NET and delegate to the gadget container for rendering.

Eric Hauser
thanks Eric, i could probably run PHP module under IIS and take care of Shindig this way :) I just worry about the performance hit on my IIS when i do that. Any insight on this?What about the APIs, restful and javascript. Shindig provides me with both of them? All I need is to delegate them over from Shinding to my own services?
Admin
For performance, you might want to read up on FastCGI under IIS7: http://blogs.iis.net/bills/archive/2006/10/31/PHP-on-IIS.aspx. Yes, Shindig well provide both the REST and Javascript libraries for you. You just need to implement the interfaces (or whatever PHP calls them) for responding.
Eric Hauser
Excellent. Big thanks for your help!
Admin