Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What to do when users generate the same action several time waiting for download?

I am designing an IPhone application. User search something. We grab data from the net. Then we update the table.

THe pseudocode would be

[DoThisAtbackground ^{
  LoadData ();
  [DoThisAtForeground ^{
    UpdateTableAndView();
  }];
}];

What about if before the first search is done the user search something else.

What's the industry standard way to solve the issue?

  1. Keep track which thread is still running and only update the table when ALL threads have finished?
  2. Update the view every time a thread finish?

How exactly we do this?

like image 799
user4951 Avatar asked Oct 07 '22 16:10

user4951


1 Answers

I suggest you take a look at the iOS Human Interface Guidelines. Apple thinks it's pretty important all application behave in about the same way, so they've written an extensive document about these kind of issues.

In the guidelines there are two things that are relevant to your question:

  • Make Search Quick and Rewarding: "When possible, also filter remote data while users type. Although filtering users' typing can result in a better search experience, be sure to inform them and give them an opportunity to opt out if the response time is likely to delay the results by more than a second or two."
  • Feedback: "Feedback acknowledges people’s actions and assures them that processing is occurring. People expect immediate feedback when they operate a control, and they appreciate status updates during lengthy operations."

Although there is of course a lot of nonsense in these guidelines, I think the above points are actually a good idea to follow. As a user, I expect something to happen when searching, and when you update the view every time a thread is finished, the user will see the fastest response. Yes, it might be results the user doesn't want, but something is happening! For example, take the Safari web browser in iOS: Google autocomplete displays results even when you're typing, and not just when you've finished entering your search query.

So I think it's best to go with your second option.

like image 95
Frog Avatar answered Oct 10 '22 03:10

Frog