OData和REST-ful web服务之间的区别是什么?
当前回答
REST代表具象状态传输,这是一种基于资源的架构风格。基于资源意味着数据和功能被视为资源。
OData是一个基于web的协议,它定义了一组构建和使用rest式web服务的最佳实践。OData是一种创建REST式web服务的方法,是REST的实现。
其他回答
2012年OData进行了标准化,所以我只是在这里添加了一个更新。
首先是定义:
REST——是一种如何通过HTTP发送消息的体系结构。
OData V4——是REST的一个特定实现,真正定义了不同格式的消息内容(目前我认为是AtomPub和JSON)。ODataV4遵循rest原则。
例如,asp.net开发人员将主要使用WebApi控制器将对象序列化/反序列化为JSON,并让javascript对其进行处理。Odata的关键在于能够直接从URL进行查询 开箱即用的选项。
REST代表具象状态传输,这是一种基于资源的架构风格。基于资源意味着数据和功能被视为资源。
OData是一个基于web的协议,它定义了一组构建和使用rest式web服务的最佳实践。OData是一种创建REST式web服务的方法,是REST的实现。
来自OData文档:
OData协议是一种应用程序级协议,用于通过RESTful web服务与数据交互。 ... OData协议不同于其他基于rest的web服务方法,因为它提供了一种统一的方式来描述数据和数据模型。
REST是一种通用设计技术,用于描述如何访问web服务。使用REST,您可以发出http请求来获取数据。如果你在浏览器中尝试,它就像访问一个网站,除了返回的不是网页,而是XML。一些服务还将返回JSON格式的数据,这更容易使用Javascript。
OData是一种通过REST公开数据的特定技术。
如果你想快速总结一下,可以这样想:
REST——设计模式 OData启用技术
OData (Open Data Protocol) is an OASIS standard that defines the best practice for building and consuming RESTful APIs. OData helps you focus on your business logic while building RESTful APIs without having to worry about the approaches to define request and response headers, status codes, HTTP methods, URL conventions, media types, payload formats and query options etc. OData also guides you about tracking changes, defining functions/actions for reusable procedures and sending asynchronous/batch requests etc. Additionally, OData provides facility for extension to fulfil any custom needs of your RESTful APIs. OData RESTful APIs are easy to consume. The OData metadata, a machine-readable description of the data model of the APIs, enables the creation of powerful generic client proxies and tools. Some of them can help you interact with OData even without knowing anything about the protocol. The following 6 steps demonstrate 6 interesting scenarios of OData consumption across different programming platforms. But if you are a non-developer and would like to simply play with OData, XOData is the best start for you.
欲了解更多详情,请访问http://www.odata.org/
推荐文章
- ReferenceError: description没有定义NodeJs
- REST API - dto还是不是?
- OData和REST web服务的区别
- 在单元测试中设置HttpContext.Current.Session
- 用Spring我可以做一个可选的路径变量吗?
- XSD和WSDL之间的区别是什么?
- 哪个HTTP状态代码表示“尚未准备好,稍后再试”?
- Django REST框架:向ModelSerializer添加额外字段
- 火灾vs. Webservice
- REST和RPC之间的Web服务差异
- REST DELETE真的是幂等的吗?
- 如何用node.js实现一个安全的REST API
- 如何在Node.js内进行远程REST调用?旋度吗?
- Rails new vs create
- 如何使用邮差导出具体要求文件?