找回密码
 FreeOZ用户注册
查看: 2431|回复: 2
打印 上一主题 下一主题

[新技术交流] JSON+REST vs. XML+SOAP

[复制链接]
跳转到指定楼层
1#
发表于 12-4-2010 23:21:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?FreeOZ用户注册

x
http://blog.feedly.com/2009/03/03/jsonrest-vs-xmlsoap/
[size=8.33333px]March 3, 2009 · 7 Comments[size=1.4em]Google just announced that they are getting ready to kill their SOAP API. XML+SOAP was a good milestone in the history of integration but it is now time to look at the next milestone and that next milestone is JSON+REST. We briefly talked about that in abstract terms a couple of years ago but  here are 3 simple reasons why:
Reason #1
JSON is a lot simpler than XML+XML Schema and is more isomorphic with the relational data stores most services use for persistence.
Reason #2
Browsers can consume large amount of JSON much more efficiently than they can consume large amount of XML and the gap is widening because the latest versions of the browsers are now providing native, safe support for encoding and decoding JSON.
Reason #3
REST interfaces are much easier to design and implement than SOAP interfaces: verbs are already defined, exception semantics are already defined, caching semantics are already defined, versioning semantics are already defined, authentication and access control are already defined. All you really need to focus on are modeling resources using JSON, modeling URL hierarchies, modeling search patterns and modeling batching for performance improvements.
And the gap will continue to widen as the open web stack matures and things like Open ID and OAuth become more widely spread.
If you are looking for a best practice implementation, take a look at the Friendfeed API.
Note: I can see my old friends saying: “But Edwin, JSON+REST is just a binding component, we already have support for that”

                               
登录/注册后可看大图



回复  

使用道具 举报

2#
发表于 13-4-2010 09:40:20 | 只看该作者
注意排版,太不付责任了
回复  

使用道具 举报

3#
发表于 13-4-2010 11:23:07 | 只看该作者
hehe,严重同意google的观点. SOAP多数情况下是过于复杂了
回复  

使用道具 举报

您需要登录后才可以回帖 登录 | FreeOZ用户注册

本版积分规则

小黑屋|手机版|Archiver|FreeOZ论坛

GMT+10, 26-4-2024 22:54 , Processed in 0.035497 second(s), 18 queries , Gzip On, Redis On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表