iPhone:我应该从网络服务带回多少对象?

发布于 2024-10-20 06:06:40 字数 193 浏览 8 评论 0原文

我正在使用 Rails Web 服务,想知道第一次调用时应该带回多少个 json 对象?

选项:

  1. 带回 200 个 Web 服务,但在 uitableview 中仅显示 25 个,并具有加载更多功能?
  2. 带回 25 并单击“加载更多”从 Web 服务获取另一个 25?
  3. ????

I am using a Rails webservice and was wondering how many json objects I should bring back on the first call?

Options:

  1. Bring back 200 webservice but only show 25 in the uitableview w/ Load more feature?
  2. Bring back 25 and on clicking load more fetch another 25 from webservice?
  3. ????

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

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

发布评论

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

评论(3

月亮邮递员 2024-10-27 06:06:40

如果没有经验数据,很难说,但我猜总体而言,处理较小的数据集和更多的调用对用户来说会更好一些。原因是用户倾向于“赶紧等待”。他们点击某个东西,当他们点击那个东西时,他们在 5 秒前就想要它(快点)。一旦他们看到数据,他们可能想在请求新数据之前实际查看一下(等待)。

这也是后台加载的一个论点,因为用户正在玩弄东西,如果您可以在他们要求之前无形地加载其他信息,那么他们的 UI 就会更好,但您可能会浪费服务器上的带宽,并且他们的电池。这让我们回到需要良好的指标。让它发挥作用并将其交到一些人手中,看看感觉如何,然后从那里开始提供一些真正的用户体验反馈。

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). 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. 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.

单挑你×的.吻 2024-10-27 06:06:40

如果您可以在相对较短的时间内带回 200 个物体,那么当用户滚动时,蜂窝或 WiFi 无线电可能会进入低功耗模式更长时间,从而延长电池寿命。

如果加载超过 25 个对象需要很长时间,您可能不希望保持无线电通电,直到您知道用户想要查看该数据。

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.

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.

恏ㄋ傷疤忘ㄋ疼 2024-10-27 06:06:40

我会说,别费心把东西带回来,那不会花太多时间。如果您从 Web 服务获取 500 个对象,它只是一个 xml 文件,加载和解析不会花费太多时间。您可以在后台线程或延迟加载中轻松实现它。如果您同时尝试更新 UI,问题就会出现。绘制视图将消耗大部分周期。所以要巧妙处理。

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. You can easily achieve it in background thread or lazy loading. The problem should come, if you are simultaneously trying to update the UI. Drawing a view will consume most of the cycles. So handle it tactfully.

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