问题描述
我们正在计划一个项目.基本上,我们的服务器上有大量宁静的服务.这些 Restful 服务将返回 XML 作为数据类型.
We are planning a a project. Basically we have tons of restful services sitting on our server. These restful services will return XML as data type.
我们将在各种移动平台上构建应用,例如 Adroid/iOS/可能的其他平台.该应用可能需要非常频繁地调用这些安静的服务.
We will build apps on various mobile platforms, like Adroid/iOS/possible others. The app potentially need to call those restful services quite frequently.
由于我们处于规划阶段,我想知道这里是否有人对不同移动平台的性能有所了解.例如,在移动平台上,我们假设我们需要以非常有效的方式返回数据.我们可以针对特定的移动平台以不同的方式压缩数据.或者我们在使用restful服务时需要注意那些移动平台的其他可能的差异?
Since we are in the planning stage, I am wondering whether anyone here has insights about performance regarding different mobile platforms. For example, on the mobile platforms we assume that we’ll need to return data in a very efficient manner. We can compress data differently for particular mobile platform. Or any other possible differences we need to pay attention to those mobile platforms when consuming restful service?
推荐答案
使用 JSON 数据格式.
Use JSON data format.
在您的服务器上生成速度更快,通过网络传输速度更快,在设备上解析和使用速度更快.
It's faster to generate on your server, faster to transmit over network, and faster to parse and consume on the device.
这篇关于如何提高 Android/iOS/etc 使用 Web 服务的性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!