- 浏览: 570296 次
- 性别:
- 来自: 浙江省杭州市
文章分类
最新评论
-
jiajiafucs:
有例子吗?初学,不会用..
改变只读文本框的的背景颜色(原) -
chen_yanhua123:
终于下到了,谢谢
tomcatplugin下载地址 -
gwfuliyang:
http://www.eclipsetotale.com/to ...
tomcatplugin下载地址 -
wcj343169893:
你给的那个地址,下载不了呀,楼主 可以发一个给我么??我的邮 ...
在win32上ruby连接MySQl(转) -
justin18:
受教了,非常谢谢~
解决安装IIS时提示找不到zClientm.exe文件的问题(转)
REpresentational State Transfer(REST) 代表性状态传输
REST是WEB服务的一种架构,简单的说就是通过HTTP协议提供XML数据。最常见的应用就是RSS.
REST的基本规则:
1、所有可区分的实体都是资源,这些资源可以是一个XML文档,或者是一个HTML页面来进行描述(Representation ). 补充:鉴于xml的结构化,跨平台等等特性,建议所有的资源都通过xml进行描述
2、每个资源通过一个唯一的URL进行定义
3、WEB服务返回的数据应该包含其它数据的链接地址(URL). 也就是说,把要提供的数据设计成一个信息网络
4、服务提供方维护一组资源,并公开一组基本操作来执行以下任务:
检索资源(HTTP GET)
创建新资源 (HTTP POST)
修改资源 (HTTP POST)
删除资源 (HTTP POST)
REST与SOAP(Simple Object Access Protocal, 简单对象访问协议)的比较
1、从基本原理层次上来讲,REST适合于面向资源的服务,服务提供方维护一组资源,并公开一组基本操作来执行以下任务:
检索资源
修改资源
创建新资源
删除资源
资源是他们关心的中心。
而SOAP更适合于面向活动的服务,客户端请求的每个活动的操作是他们关心的中心。
2、从使用上来说,REST更简单,更快速,而SOAP在安全性方面会有更多更好的方案供选择
Flickr就是采用REST方式提供的 WEB SERVICES
而Amazon95%的服务也采用该方式
了解更多的WEB服务和SOAP 到http://www-128.ibm.com/developerworks/cn/webservices/
下面的文章介绍的比较详细:
来源:http://searchwebservices.techtarget.com/qna/0,289202,sid26_gci823342,00.html
REST could burst SOAP's bubble
Simple Object Access Protocol (SOAP), today's de facto Web services communications protocol, and has come a long way since Microsoft first developed it in 1999. However, the latest Web services fad is an architecture called REST, or representational state transfer. First coined in a popular dissertation by eBuilt's Roy Fielding, REST is a distributed computing framework that stresses component interaction and scalability. SearchWebServices spoke with Roy Hoobler, director of Internet technologies for Net@Work Inc., about REST and its potential impact on Web services.
Is there a simple way to explain REST?
Hoobler: Here's the way (Amazon.com) is using REST. Typically, if I'm building an XML application, usually I have to have the XML file on my machine. However, with most XML apps, that doesn't have to be the case because you can access the XML file through any valid URL. For instance, I can go out to your Web site and get an XML file and parse it on my machine.
If it's in a database, it has to be a local database. I can't connect directly to Amazon's database, and there's no way they're going to let me. So, they might have a SOAP service, or they might do a query through HTTP, which is what they're doing. What they're doing (with REST) is building an XML document on the fly and returning (database data) via HTTP. I can use that on my system, save it and process it. There's a lot I can do with that and I don't need SOAP, and I don't have to program anything.
Is it really that simple?
Hoobler: It's a very simple process. If someone has an XML file and they give me the URL for it, then I can download the content. There's almost no programming involved. Someone can upload a text file that's basically XML, and I can download it through the browser. It's a little more complicated than that, but not much.
SOAP is also rather slow compared to REST, because of the communication that's going on. When you're using REST, you're pulling that info just as if you were looking at a Web page on the site. It comes down really fast. With SOAP, there's a lot more transactional information moving behind the scenes.
So is REST more of a methodology than a specification?
Hoobler: It's a technique. Other sites that have used this are a lot of the blogger sites, Web log sites and such. They offer the same thing, but they use a method called RSS (Resource Site Summary). They offer almost the exact same thing but it's in RDF (Resource Developer Framework), which is an XML format. For instance, if I have a list of the links on my Web site to tell you about, all I have to do is give you a URL were you can download the info in RDF. So it's similar to REST and what Amazon's doing. It's like a very cheap subscription service. You wouldn't have to write a Web service. You can just go there and get the content.
Amazon.com is currently using a REST-style Web service to share product-pricing info with its reseller partners. What would it have to do if it used SOAP to do the same thing?
Hoobler: First, (Amazon.com) would have to implement a SOAP server. They'd have to build that themselves, which can be complicated, or they could use a third party system. Once they have a SOAP server, end-users would have to build SOAP clients that can communicate with the SOAP server. There would be a lot of programming involved, and most people haven't used SOAP yet, so they'd be left out. With technologies like REST or RSS, that kind of programming doesn't have to take place, and Web services don't take as much effort.
If it's so simple, why hasn't it caught on like SOAP has?
Hoobler: It's not as powerful. With REST, you're just grabbing content. There's not as much processing that needs to be done. You can do much more complex operations with SOAP. If Amazon needed to send me much more information, and then I wanted to process that info -- like in some bank transaction where I had to give them a lot of info -- and then they had to check it and continue the transaction a little bit longer, that's where SOAP is very good. REST has not taken off in the business world because [the] people actually building these big integration servers [think] it's not powerful enough and doesn?t do enough.
Can you give me an example?
Hoobler: If I'm using REST, I might be able to get a Web site's list of stock tickers, but I can't get the values of those tickers. If I'm using SOAP, I can get to the values, manipulate them, and then send the results of my calculations. Let's say I got the values from you, and I wanted to let you know that they're wrong. If I wanted to send you back something that says they're wrong, with REST that can't be done. With REST, you request information, you get it, and that's where it ends.
How easy or difficult is it to learn to work with REST, versus working with SOAP?
Hoobler: To work with SOAP, you really need some kind of infrastructure -- like from IBM or Microsoft -- that supports SOAP. Some third parties, like Cape Clear, offer SOAP implementations, but you have to have all that software installed and know that infrastructure. With REST, to display that information on a Web page, you have to know XML and XSLT, and a lot of platforms -- like WebSphere and all of those Java application servers -- have that built in, or it's very easy to add it on.
Going the other way, if you wanted to use SOAP, you'd have to use the whole .NET framework, or you'd have to use WebSphere Studio. You'd have to use a hefty application, so it's an investment of time and money.
How can a company determine if it should be working with REST instead of SOAP?
Hoobler: I would say if a company's just working with content-oriented data, and you have not implemented SOAP, then REST is a very good way to start working with XML and start displaying syndicated content. If you've implemented SOAP and the infrastructure is in place and you've got programmers coming out your ears, then you don't need to use REST.
文章引用自:http://blog.sina.com.cn/u/467cbd19010002vp
REST是WEB服务的一种架构,简单的说就是通过HTTP协议提供XML数据。最常见的应用就是RSS.
REST的基本规则:
1、所有可区分的实体都是资源,这些资源可以是一个XML文档,或者是一个HTML页面来进行描述(Representation ). 补充:鉴于xml的结构化,跨平台等等特性,建议所有的资源都通过xml进行描述
2、每个资源通过一个唯一的URL进行定义
3、WEB服务返回的数据应该包含其它数据的链接地址(URL). 也就是说,把要提供的数据设计成一个信息网络
4、服务提供方维护一组资源,并公开一组基本操作来执行以下任务:
检索资源(HTTP GET)
创建新资源 (HTTP POST)
修改资源 (HTTP POST)
删除资源 (HTTP POST)
REST与SOAP(Simple Object Access Protocal, 简单对象访问协议)的比较
1、从基本原理层次上来讲,REST适合于面向资源的服务,服务提供方维护一组资源,并公开一组基本操作来执行以下任务:
检索资源
修改资源
创建新资源
删除资源
资源是他们关心的中心。
而SOAP更适合于面向活动的服务,客户端请求的每个活动的操作是他们关心的中心。
2、从使用上来说,REST更简单,更快速,而SOAP在安全性方面会有更多更好的方案供选择
Flickr就是采用REST方式提供的 WEB SERVICES
而Amazon95%的服务也采用该方式
了解更多的WEB服务和SOAP 到http://www-128.ibm.com/developerworks/cn/webservices/
下面的文章介绍的比较详细:
来源:http://searchwebservices.techtarget.com/qna/0,289202,sid26_gci823342,00.html
REST could burst SOAP's bubble
Simple Object Access Protocol (SOAP), today's de facto Web services communications protocol, and has come a long way since Microsoft first developed it in 1999. However, the latest Web services fad is an architecture called REST, or representational state transfer. First coined in a popular dissertation by eBuilt's Roy Fielding, REST is a distributed computing framework that stresses component interaction and scalability. SearchWebServices spoke with Roy Hoobler, director of Internet technologies for Net@Work Inc., about REST and its potential impact on Web services.
Is there a simple way to explain REST?
Hoobler: Here's the way (Amazon.com) is using REST. Typically, if I'm building an XML application, usually I have to have the XML file on my machine. However, with most XML apps, that doesn't have to be the case because you can access the XML file through any valid URL. For instance, I can go out to your Web site and get an XML file and parse it on my machine.
If it's in a database, it has to be a local database. I can't connect directly to Amazon's database, and there's no way they're going to let me. So, they might have a SOAP service, or they might do a query through HTTP, which is what they're doing. What they're doing (with REST) is building an XML document on the fly and returning (database data) via HTTP. I can use that on my system, save it and process it. There's a lot I can do with that and I don't need SOAP, and I don't have to program anything.
Is it really that simple?
Hoobler: It's a very simple process. If someone has an XML file and they give me the URL for it, then I can download the content. There's almost no programming involved. Someone can upload a text file that's basically XML, and I can download it through the browser. It's a little more complicated than that, but not much.
SOAP is also rather slow compared to REST, because of the communication that's going on. When you're using REST, you're pulling that info just as if you were looking at a Web page on the site. It comes down really fast. With SOAP, there's a lot more transactional information moving behind the scenes.
So is REST more of a methodology than a specification?
Hoobler: It's a technique. Other sites that have used this are a lot of the blogger sites, Web log sites and such. They offer the same thing, but they use a method called RSS (Resource Site Summary). They offer almost the exact same thing but it's in RDF (Resource Developer Framework), which is an XML format. For instance, if I have a list of the links on my Web site to tell you about, all I have to do is give you a URL were you can download the info in RDF. So it's similar to REST and what Amazon's doing. It's like a very cheap subscription service. You wouldn't have to write a Web service. You can just go there and get the content.
Amazon.com is currently using a REST-style Web service to share product-pricing info with its reseller partners. What would it have to do if it used SOAP to do the same thing?
Hoobler: First, (Amazon.com) would have to implement a SOAP server. They'd have to build that themselves, which can be complicated, or they could use a third party system. Once they have a SOAP server, end-users would have to build SOAP clients that can communicate with the SOAP server. There would be a lot of programming involved, and most people haven't used SOAP yet, so they'd be left out. With technologies like REST or RSS, that kind of programming doesn't have to take place, and Web services don't take as much effort.
If it's so simple, why hasn't it caught on like SOAP has?
Hoobler: It's not as powerful. With REST, you're just grabbing content. There's not as much processing that needs to be done. You can do much more complex operations with SOAP. If Amazon needed to send me much more information, and then I wanted to process that info -- like in some bank transaction where I had to give them a lot of info -- and then they had to check it and continue the transaction a little bit longer, that's where SOAP is very good. REST has not taken off in the business world because [the] people actually building these big integration servers [think] it's not powerful enough and doesn?t do enough.
Can you give me an example?
Hoobler: If I'm using REST, I might be able to get a Web site's list of stock tickers, but I can't get the values of those tickers. If I'm using SOAP, I can get to the values, manipulate them, and then send the results of my calculations. Let's say I got the values from you, and I wanted to let you know that they're wrong. If I wanted to send you back something that says they're wrong, with REST that can't be done. With REST, you request information, you get it, and that's where it ends.
How easy or difficult is it to learn to work with REST, versus working with SOAP?
Hoobler: To work with SOAP, you really need some kind of infrastructure -- like from IBM or Microsoft -- that supports SOAP. Some third parties, like Cape Clear, offer SOAP implementations, but you have to have all that software installed and know that infrastructure. With REST, to display that information on a Web page, you have to know XML and XSLT, and a lot of platforms -- like WebSphere and all of those Java application servers -- have that built in, or it's very easy to add it on.
Going the other way, if you wanted to use SOAP, you'd have to use the whole .NET framework, or you'd have to use WebSphere Studio. You'd have to use a hefty application, so it's an investment of time and money.
How can a company determine if it should be working with REST instead of SOAP?
Hoobler: I would say if a company's just working with content-oriented data, and you have not implemented SOAP, then REST is a very good way to start working with XML and start displaying syndicated content. If you've implemented SOAP and the infrastructure is in place and you've got programmers coming out your ears, then you don't need to use REST.
文章引用自:http://blog.sina.com.cn/u/467cbd19010002vp
发表评论
-
试玩了下haml
2007-07-26 14:26 1493起初我以为能用%= error_messages_for 's ... -
突然想到用$了```
2007-07-24 09:36 1062原本想按照一个网友说的用partial去做,今天突然想起来用$ ... -
UnknownAction (No action responded to...(原)
2007-07-18 13:37 1646今天在结合live search和进度提示做的时候遇到了这样一 ... -
自助生成rails api 文档(转)
2007-07-18 13:19 2676rails doc_app cd doc_app rake ... -
scriptaculous(转)
2007-07-18 10:15 1036Effect.BlindDown('d1',{})函数的花括号 ... -
控制Rails Application的Logging文件大小(转)
2007-07-17 20:24 1275这是一个很容易被忽视的问题,尤其是对于新入门的Rails程序员 ... -
关于自动完成的补充(原)
2007-07-16 17:34 1153在用自动完成的时候发现按下tab或者enter键时它默认自动输 ... -
params小记(原)
2007-07-16 17:21 1164小记一下以备查用: 我在用自动完成功能的时候用params[: ... -
个性化的Validation
2007-07-13 17:14 1212终于知道怎么从: ↓ 了,弄过以后看起来也人性化了不少啊 ... -
搞定关于text_field_with_auto_complete的一个错误(原)
2007-07-13 14:12 1225@mathsfan=params[:product][:mat ... -
undefined method `auto_complete_for` for
2007-07-13 09:16 1522在做Live Search的时候如果出现如下错误: undef ... -
effects.js小记(原)
2007-07-12 20:01 2636缩放图片: <%= image_tag("de ... -
用url_encode解决了我一个问题
2007-07-11 21:10 1893分页的时候传查询的参数的时候,当输入中文时浏览器中也是中文,可 ... -
将 varchar 值 转换为数据类型为 int 的列时发生语法错误
2007-07-11 10:48 4162以前我在查询ID编号的时候为了实时的去检测ID发生过这样一个错 ... -
列前缀 与查询中所用的表名或别名不匹配
2007-07-11 00:26 4173以前只是用SCH插件进行一个表格数据的排序,现在要同时对多个表 ... -
改变只读文本框的的背景颜色(原)
2007-07-03 20:56 5382网上查了下,至少有三种方法可以使文本框变为只读属性: :Rea ... -
is not a class/module错误的解决方法(原)
2007-06-29 21:51 1402用别人的电脑问题还真多啊,刚导好数据库以后一运行就是错误: T ... -
svn下载
2007-06-27 21:52 5508今天在下载sch(sortable_column_header ... -
使用SCH插件时遇到的错误(原)
2007-06-27 13:34 1182我用rake db:migrate导数据库时遇到这样一个错误: ... -
用gettext遇到的一个问题
2007-06-20 10:07 1157在用gettext时遇到这样的错误:Status: 500 I ...
相关推荐
rest转换 . rar
之前考虑使用socket.io,客户端选择了java swing,很多问题,换了qt写client,连接不上socket.io,很是麻烦,所以转成了现在的模式,js+qt。框架可能对某些人来说没什么,但是这点代码自己折腾了挺长时间,所以分值...
本代码源自转自【http://www.lifeba.org/arch/restlet_develop_application_component_2.html 】但有改动,主要改动有: 1. 修改了web.xml的段,使工程既可以访问rest服务,又可以访问普通的页面资源,不用再像原...
Androidannotation使用之@Rest与服务器交互的JSON数据转换
soap_to_rest_node
本文介绍 sqlRest 框架,它是一种高效的轻量级数据库 REST 服务解决方案,您可以通过简单的配置直接将数据库中的数据暴露成 REST 风格的 Web 服务,并将数据库的 CRUD 操作和 REST 服务的 GET, DELETE, POST, PUT...
RESTier, 构建rest式服务的一个转向 RESTier 1.介绍OData支持开放数据协议。 它是由微软发起的,现在是ISO和OASIS标准。 使用简单HTTP请求,可以以创建和使用 RESTful api,使资源在数据模型中定义,并使用url进行...
graphql-rest-proxy:用于将REST API转换为GraphQL
本资源包含网页和JAVA代码,分别演示基于百度语音合成REST API对接的POST方式提交接口数据,及其返回格式。网页格式直接返回语音,JAVA程序将POST调用返回的二进制数据流以字节流的方式存储在本地.mp3文件中。鉴于...
通过Spring Cloud的封装,可以让我们轻松地将面向服务的REST模版请求自动转换成客户端负载均衡的服务调用。Spring Cloud Ribbon虽然只是一个工具类框架,它不像服务注册中心、配置中心、API网关那样需要独立部署,...
涉及到的知识点:1.WCFRest实现基础(WCFRest后面单独讲,没接触过的,就根据我的例子依葫芦画瓢,到实际要用时再研究不迟);2.Http的Get和Post请求;3.页面跳转传值;4.实体类对象与Json字符串的互转;5.子线程中...
apiize:将JSON文件转成可浏览的REST API
Delphi REST 服务器返回UTF16编码转换成正常string示例.rar
如何调用百度RESTAPI接口把文字转换成mp3音频,得到mp3文件
网络配置将netconf调用转换为REST API for Fortigate的桥梁它将监听netconf请求(端口830)并将其转换为REST API调用。 目前仅对Fortigate有效。 它不会在内部针对任何模式进行验证。 如果请求格式错误,即不是按照...
kong-plugin-soap2rest 插件,用于将SOAP请求重定向到REST API并将JSON响应转换为SOAP响应。 目录 兼容的Kong版本 港版 测试通过 2.3.x :check_mark_button: 2.2.x :check_mark_button: 2.1.x :check_...
graphql-rest-proxy将您的REST服务器转换为GraphQL服务器。 安装npm -g install graphql-rest-proxy或如果使用Yarn:yarn global add graphql-rest-proxy为什么我们都知道GraphQL是grea graphql-rest-proxy将您的...
sandman:为现存的数据库驱动系统自动创建 REST APIs
rest2mobile, 磁铁rest2mobile的家庭网络 磁铁 rest2mobile 磁铁rest2mobile从 REST api生成移动应用的本地代码。 它将实际REST请求和响应转换为源代码( 。objective-c,Android和 JavaScript ),你可以从移动应用...
GraphQL2REST 从现有的GraphQL API自动生成RESTful API GraphQL2REST是一个Node.js库,可读取您的GraphQL模式和用户提供的清单文件,并自动生成具有完全RESTful HTTP路由(即成熟的REST API)的Express路由器。 为...