P13
REST式架构意味着,方法信息都在HTTP方法里;面向资源的架构意味着,作用域信息都在URI里。
----------------------------
In RESTful architectures, the method information goes into the HTTP method. In Resource-Oriented Architectures, the scoping information goes into the URI.
P17
Flickr web API 是一种 REST-RPC 混合架构:当客户端通过GET方法获取数据时,它是REST式的;当客户端通过GET方法修改数据时,它是RPC式的。
----------------------------
The Flickr web API is a REST-RPC hybrid: RESTful when the client is retrieving data through GET, RPC-style when the client is modifying the data set.
P18
一个 REST 式面向资源的服务为客户端可能操作的每一则数据暴露一个 URI;一个 REST-RPC 混合服务,为客户端可能进行的每一个操作暴露一个 URI(比如获取数据用一个 URI,删除数据用另一个 URI);一个 RPC 式服务,为每个处理远程调用的进程暴露一个URI,一般来说这样的URI只有一个,即服务的“端点”。
----------------------------
A RESTful, resource-oriented service exposes a URI for every piece of data the client might want to operate on. A REST-RPC hybrid exposes a URI for every operation the client might perform: one URI to fetch a piece of data, a different URI to delete that same data. An RPC-style service exposes one URI for every processes capable of handling Remote Procedure Calls (RPC). There’s usually only one such URI: the service “endpoint.”
P20
REST 式架构的主要竞争对手是 RPC 式架构,而不是 SOAP 这样特定的技术。没错,几乎所有现有的基于 SOAP 的服务都属于 RPC 式架构,但 SOAP 跟 HTTP 一样,只是一种把文档放在信封里的方式。
----------------------------
The primary competitors to RESTful architectures are RPC architectures, not specific technologies like SOAP. It is true that basically every SOAP service that now exists has an RPC architecture, but SOAP is just a way of putting a document in an envelope with stickers on it, like HTTP.
没有评论:
发表评论