SOAP、REST 或仅用于 Objective-C/iPhone 与服务器解决方案的 XML [英] SOAP, REST or just XML for Objective-C/iPhone vs. server solution

查看:13
本文介绍了SOAP、REST 或仅用于 Objective-C/iPhone 与服务器解决方案的 XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们将建立一个解决方案,让 iPhone 从服务器请求数据.我们可以选择决定采用哪种解决方案,但我们不确定要走哪条路.

We are going to set up a solution where the iPhone is requesting data from the server. We have the option to decide what kind of solution to put in place and we are not sure about which way to go.

关于 SOAP,我想我有答案,没有真正稳定的解决方案(我知道有解决方案,但我想要稳定的东西).

Regarding SOAP I think I have the answer, there are no really stable solution for doing this (I know there are solutions, but I want something stable).

REST 怎么样?

还是创建我们自己的 XML 更好?请求/响应流不会那么复杂.

Or is it better to just create our own XML? It's not going to be so complicated reguest/respons-flow.

提前致谢!

推荐答案

你并不是说你的数据结构有多复杂,以及你是否真的需要状态处理.

You are not saying how complex your data structures are and if you actually need state handling.

如果您想将网络流量保持在最低水平,同时仍保留 XML 的一些结构化功能,您可以查看 JSON.它是一个非常轻量级的数据封装框架.有一些适用于 iPhone 的实现,例如 TouchJSON

If you want to keep your network traffic to a minimum, while still keeping some of the structured features of XML, you might have a look at JSON. It is a very light weight data encapsulation framework. There are some implementations available for iPhone, for instance TouchJSON

克劳斯

这篇关于SOAP、REST 或仅用于 Objective-C/iPhone 与服务器解决方案的 XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆