开发者

Android JSON vs REST

im starting with web services. I'm working in a project that needs to communicate Android with a web server and I'd like to save some time ch开发者_开发百科osing the appropriate protocol for the communication. Between JSON ,REST and SOAP: Which ones can I run in a non-dedicated server? Whats the best choice for a high trafic server?

Thanks in advance


JSON and REST are not mututally exclusive. JSON is a data format that the REST interface can return.

You may run either on a non dedicated server. I would personally choose REST for rapid prototyping on Android as it is easier to get up and running. (With SOAP you will probably want to have a schema which takes time to put together)


There's a good comparison between REST and SOAP on the REST wiki article: http://en.wikipedia.org/wiki/Representational_State_Transfer#Concept

REST is more of a framework than a communications protocol. JSON and SOAP could be use to create a RESTful application.

If you're writing something with many resources, I'd use REST as it is far more structured. There are also a lot of libraries that will set most of things up for you. I find JSON and SOAP are better for custom functionality that you want to hack together quickly. They can be lightweight, but less structured.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜