创建 REST 客户端 API
我目前正在研究为 RESTfull 应用程序创建客户端 API 的选项。 到目前为止,我们已经有了 WCF 服务来允许所有应用程序连接到业务层,但我们对此越来越不满意。
我们已经拥有大部分 Web 基础设施(html 和 json 请求),但我们需要从其他应用程序访问服务(有些将链接到主 Web 应用程序模型库,其他则不会)。
我一直在此处和这里 看起来这会很有用。 我们可以生成 wadl(客户端库)并使用它来检查 javascript url。
我想知道其他人用过什么,什么有效,什么无效。
I'm currently looking into options for creating a client API for a RESTfull application. Up until now we have had WCF services to allow all application to connect to the Business Layer and we're growing dissatisfied with it.
We already have most of the infrastructure in place for the web (html and json requests) but we need to access the services from other applications (some will be linked against the main web app models library, others won't be).
I've been reading about WADL here and here and it seems like it would be beneficial. We could generate the wadl, the client libraries and use it to check javascript urls.
I would like to know what others have used, what worked and what didn't.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
一个好的 REST 客户端 API 是一组围绕 curl、wget 或特定于您的语言的 HTTP 库的包装器。 您可能还需要一些额外的方法或函数来处理应用程序的具体情况(即专门的 XML/JSON 解析),但仅此而已。
A good rest client API is a set of wrappers around curl, wget, or your language specific HTTP libraries. You might need some extra methods or functions to deal with the specifics of your application as well (i.e. specialized XML/JSON parsing), but that should be about it.
在 REST 架构中:
In the REST architecture:
iBeans 是一个新的开源项目,试图为此提供解决方案。 iBean(集成 Bean)是用于 RESTful 或其他服务的客户端 API。 目前 iBeans 确实需要服务器(您可以轻松地将框架放入 Tomcat 中)并且可以从 Javascript 或 java 应用程序使用。
iBeans is a new open source project that is attempting to provide a solution to this. iBeans (Integration Beans) are client APIs for RESTful or other services. Currently iBeans does require a server (you can drop the framework into Tomcat quite easily) and can be used from Javascript or java applications.
试试这个网络应用程序:FRAPI。 这是相当令人印象深刻的
Try this web app: FRAPI. It's quite impressive