读 RESTful Web Service 第一章

Chapter 1, The Programmable Web and Its Inhabitants

普通Web和可编程Web的区别:普通Web使用HTML,而可编程Web使用XML

Kinds of Things on the Programmable Web
可编程Web基于HTTP和XML。有部分使用HTML、JSON、纯文本或者二进制文件,但大部分使用XML
两种区分可编程Web上的服务的方式:技术(URIs,SOAP,XML-RPC等)或底层架构和设计哲学

HTTP:Documents in Envelopes
HTTP请求的主要部分:HTTP method、path、request headers、entity-body/document/representation
HTTP响应的主要部分:HTTP response code、response headers、entity-body/representation

Method Information
HTTP八个方法
OPTIONS:The OPTIONS method represents a request for information about the communication options available on
the request/response chain identified by the Request-URI.
GET:The GET method means retrieve whatever information(in the form of an entity) is identified by the Request-URI.
HEAD:The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.
POST:The POST method is used to request that the origin server accept the entity enclosed in the request as a new
subordinate of the resource identified by the Request-URI in the Request-Line.
PUT:The PUT method requests that the enclosed entity be stored under the supplied Request-URI.
DELETE:The DELETE method requests that the origin server delete the resource identified by the Request-URI.
TRACE:The TRACE method is used to invoke a remote, application-layer loop-back of the request message.
CONNECT:This specification(rfc2616) reserves the method name CONNECT for use with a proxy that can dynamically switch
to being a tunnel

Scoping Information
URI path

The Competing Architectures
三种风格的Web服务架构
RESTful,面向资源的架构:S3、GData
RPC风格的架构:XML-RPC、SOAP
REST-RPC混合架构:del.icio.us、Flickr、大部分Web程序

所有的静态Web站点都是RESTful的

If it's on the Web, it's a web service.

Technologies on the Programmable Web
HTTP,URI,XML-RPC,SOAP,WS-*,WSDL,WADL

Leftover Terminology
Service-Oriented Architecture:面向服务架构
SOAP as a competitor to REST:RESTful架构最大的敌人是RPC架构,而不是特有的技术如SOAP。SOAP由于历史的偶然性与RPC架构
绑定在一起。
HTTP+POX:HTTP+Plain Old XML,代表了REST-RPC混合服务。但有时候不用XML而使用JSON,纯文本或二进制文件。重点在于在于这些
服务具有RESTful的设计,而基本架构是面向RPC的。
STREST:Service-Trampled REST,它是REST-RPC混合服务架构的另一个术语。
Hign and low REST:用于区分RESTful服务和REST-RPC混合服务,High REST指RESTful,Low REST则值RPC风格

你可能感兴趣的:(编程,Web,xml,REST,SOAP)