2007-08-15
读 RESTful Web Service 第一章
关键字: REST
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和可编程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风格
发表评论
- 浏览: 681934 次
- 性别:

- 来自: BJ

- 详细资料
搜索本博客
我的相册
screenshot
共 1 张
共 1 张
最近加入圈子
最新评论
-
Mnesia用户手册:三,构建 ...
要想创建disc_copies和disc_only_copies类型的表有两个前 ...
-- by hideto -
翻译www.djangobook.com之 ...
有个问题问一下: 我先配置了一个urlpatterns是这样的: r'^myd ...
-- by lyhapple -
Why OO sucks
gigix 写道lyl0035 写道为啥就没人想想,其实在面向对象的代码中也流露 ...
-- by hurd -
Why OO sucks
貌似又回到当年java vs c的年代。两种方式,不管是OO还是FP,仅是人处理 ...
-- by python -
大家可以抛弃Java踹死Djan ...
to phoenixup:1,你还别说,你举的什么Struts,Tapestry ...
-- by hideto






评论排行榜