简体   繁体   English

iPhone:我应该从webservice带回多少个对象?

[英]iPhone: how many objects should I bring back from webservice?

I am using a Rails webservice and was wondering how many json objects I should bring back on the first call? 我正在使用Rails webservice,并想知道我应该在第一次调用时带回多少个json对象?

Options: 选项:

  1. Bring back 200 webservice but only show 25 in the uitableview w/ Load more feature? 带回200个webservice但只在uitableview中显示25个加载更多功能?
  2. Bring back 25 and on clicking load more fetch another 25 from webservice? 带回25并点击加载更多从webservice获取另外25?
  3. ???? ????

If yaou can bring back 200 objects in a relatively short amount of time, the cellular or wifi radios may be able to go into a low power mode for longer, as the user scrolls, enhancing battery life. 如果您可以在相对短的时间内带回200个物体,则当用户滚动时,蜂窝或wifi无线电可能能够进入低功率模式更长时间,从而延长电池寿命。

If loading over 25 objects takes a long time, you might not want to keep the radios powered up until you know the user wants to see that data. 如果加载超过25个对象需要很长时间,您可能不希望在您知道用户想要查看该数据之前保持无线电通电。

Without empirical data it's very hard to say, but I would guess that overall, dealing with smaller datasets and more calls would be a little better for the user. 如果没有经验数据,很难说,但我想总的来说,处理较小的数据集和更多的呼叫对用户来说会更好一点。 The reason being that users tend to "hurry up and wait". 原因是用户倾向于“快点等待”。 They tap something, and when they tap that something they want it 5 seconds ago (hurry up). 他们点了点东西,当他们5秒前点击他们想要的东西时(快点)。 Once they see the data, they probably want to actually look at it a bit before they request new data (wait). 一旦他们看到数据,他们可能希望在请求新数据(等待)之前实际查看一下。

This is also an argument for background loading as the user is playing around with things, if you can load that other info invisibly before they ask for it all the better for their snappy UI, but you may be wasting the bandwidth on your server, and their battery. 这也是背景加载的一个参数,因为用户正在玩弄东西,如果你可以在他们的snappy UI更好地请求它之前隐形地加载其他信息,但是你可能在你的服务器上浪费带宽,并且他们的电池。 Which brings us back to needing good metrics. 这让我们回到需要良好的指标。 Make it work and get it into some people's hands, see how it feels, then go from there with some real UX feedback. 让它工作并将其放入某些人的手中,看看它的感受,然后从那里获得一些真实的用户体验反馈。

I will say, don't bother about bringing the objects back, that won't take much time. 我会说,不要再把物品带回去,这不会花费太多时间。 If you are grtting 500 objects from webservice, its just an xml file coming, it shouldn't take much time to load and parse. 如果您从webservice中获取500个对象,它只是一个xml文件,它不应该花费很多时间来加载和解析。 You can easily achieve it in background thread or lazy loading. 您可以在后台线程或延迟加载中轻松实现它。 The problem should come, if you are simultaneously trying to update the UI. 如果您同时尝试更新UI,则应该出现问题。 Drawing a view will consume most of the cycles. 绘制视图将消耗大部分周期。 So handle it tactfully. 所以要巧妙地处理它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM