享受代码,享受人生

SOA is an integration solution. SOA is message oriented first.
The Key character of SOA is loosely coupled. SOA is enriched
by creating composite apps.
posts - 213, comments - 2314, trackbacks - 162, articles - 45
  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理

公告

Short Explanation of REST

Posted on 2006-01-21 15:48 idior 阅读(...) 评论(...) 编辑 收藏

或许你在一些国外的Blog上看到过REST这个词,下面用一个很简单的例子说明一下REST的定义.

以浏览网页为例, 当你要查看某个网页的时候, 你需要在浏览器上输入该网页的URL. 当你发出对idior.cnblogs.com这个资源的请求后, 一个该资源的表现形式(Representation)将返回给你, 也就是idior.cnblogs.com相应的html文件. 这时候你就进入一个状态(State), 也就是查看我的blog首页的状态, 当你在我的blog中点击了某个链接http://idior.cnblogs.com/category/46628.html, 你又对另一个资源发出了请求, 随后得到一个Representation, 因此你转为(Transfer)另一个状态(State).

Client application transfers state with each resource representation. This is REST.



REST is not a standard.  You will not see the W3C putting out a REST specification. You will not see IBM or Ms selling a REST developer's toolkit. Why? Because REST is just an architectural style. You can't bottle up that style. You can only understand it, and design your Web service in that style.

 

While REST is not a standard, it does prescribe the use of standards:

--- HTTP
--- URL
--- XML/HTML/GIF/JPEG/etc (Resource Representations)
--- text/xml, text/html, image/gif, image/jpeg, etc (Resource Types, MIME Types)