iPhone:将数据传入和传出服务器的最佳方法

发布于 2024-08-27 06:46:29 字数 230 浏览 16 评论 0原文

我正在开发一个从网站下载数据的 iPhone 应用程序。网站数据库是用 SQL 实现的,网站本身使用经典的 ASP 界面。

我不确定哪种方法最适合将数据传输到服务器或从服务器传输数据。 JSON 和 SOAP 都需要 XML 处理,我不确定这如何影响性能或这两者中哪一个最好。

考虑到我们当前的服务器配置,一般情况下数据传输的最佳方法是什么?

我对这个领域很陌生,而且有点困惑。任何帮助将不胜感激。

I am developing an iPhone application that downloads data from a website. The website database is implemented in SQL and the site itself uses the classic ASP interface.

I am unsure as to which method would be best for transferring data to and from the server. Both JSON and SOAP require XML processing and I'm not sure how that affects performance or which of those two is best.

What would be the best method in general for data transfer given the server configuration we currently have?

I very new to this field and I'm a bit confused. Any help would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

画尸师 2024-09-03 06:46:29

JSON 通常比 SOAP(或任何 XML 格式)使用起来简单得多,并且 Objective-C 中的 SOAP 支持非常有限。我不确定性能,但 JSON 不使用任何 XML 解析。有两个适用于 iPhone 的优秀 JSON 库:TouchJSONjson-framework - 它们非常相似,但我听说 TouchJSON 可能更积极维持。我从未使用过 ASP,但这个问题有一些 JSON 库的资源。

JSON is generally much simpler to use than SOAP (or any XML format), and SOAP support in objective-c is very limited. I'm not sure about performance, but JSON doesn't use any XML parsing. There are two good JSON libraries for iPhone, TouchJSON and json-framework--they're pretty similar, but I've heard that TouchJSON might be more actively maintained. I've never used ASP, but this question has some resources for JSON libraries.

我ぃ本無心為│何有愛 2024-09-03 06:46:29

在我看来,使用 Plist 是最好的选择,它基本上是苹果特定的 XML 格式,可以在任何 iOS 系统上通过一行代码转换为 NSObjects,并且它是迄今为止最快的。

看这个问题:
从对象列表在.net中创建Plist

我使用它加载超过 100,000 个对象以同步到我的 iPad Core Data 应用程序,效果非常出色。观看关于该问题的视频链接,内容非常丰富。

using a Plist in my opinion is the best option, it's basically an apple specific XML format that can be converted into NSObjects in a single line of code on any iOS system and it is by far the fastest.

See this question:
create Plist in .net from list of objects

I use it to load over 100,000 objects for syncing to my iPad Core Data app, works like a champ. Watch the video link posted on that question, very informative.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文