为 ASP.NET 站点创建 OpenSocial 容器
我运行一个用 asp.net 编写的社交网站,并希望使用 OpenSocial API 向开发人员开放。我已经阅读了 opensocial.org 以及 google 的 opensocial 页面上的信息,并且对它需要什么有一个基本的了解,但仍然缺少很多信息来开始。
我知道我必须提供 RESTful API 以及 JavaScript API,使用 OAuth 方法进行身份验证。我的容器是否必须提供所有 3 种数据:JSON、XML 和 AtomPub 表示形式?
我找到了 Shindig,但它在 Apache 下运行,我需要 IIS 的一些东西。是否有任何库可以用作 API 的基础以节省时间?是否甚至建议从头开始编写整个容器?
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
规范要求您提供 JSON 和Atom 适合所有 Web 服务,XML 适合人们调用。
对于 .NET 实现,Shindig 有一个名为 pesta 的端口,支持 OpenSocial 0.8规范,但它依赖于 Google Caja 的 IKVM 版本(对于小工具安全很重要)。然而,它已经有一段时间没有得到积极的发展,并且似乎没有得到广泛的使用。
我当然不建议从头开始编写容器。 Apache Shindig 和 Google Caja,您正在查看近 50 万行代码。如果您需要在IIS下运行,我会考虑在IIS下运行Shindig的PHP版本。如果没有,请考虑使用 Shindig 作为 Java EE 应用程序服务器下的小工具容器。由于所有 API 方法都允许您提供自己的接口,因此只需通过消息队列、Thrift 等将 API 调用委托给 .NET 服务的实现即可。这样您就可以用您熟悉的语言实现所有业务逻辑和。 Shindig 可以将小工具渲染到 iframe,因此您仍然可以使用 ASP.NET 编写主站点并委托给小工具容器进行渲染。
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.