Creating OpenSocial container for ASP.NET Site
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 th开发者_StackOverflow社区ere 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
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 Java EE 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.
精彩评论