3 ms·
Paul can say this, but, {update the server first} - {return a value} - {update the UI} doesn't require much "effort".Its just a good practice. I am just sugg
by codeLullaby 19y ago
Paul can say this, but,
{update the server first} - {return a value} - {update the UI}
doesn't require much "effort".Its just a good practice.
I am just suggesting Paul.
- philh 19y agoYou could always update the UI on the assumption that it will succeed, and then check the return value. If you get failure, notify the user somehow. Making the UI seem a slight bit more responsive might not be really worth it, of course.
- paul 19y agoUI latency is actually very important, and generally under-appreciated. Sometimes, it's better to be fast than perfect.
- benhoyt 19y agoDefinitely true, especially for something like up-voting. I mean, it might fail on 0.1% of clicks, but 0.1% accuracy on a vote is pretty good. I guess if one was really concerned, you could update the UI immediately like News.YC does, and then change it back or show an error if it does happen to come back failed.
- aston 19y agoI think the standard solution here would be not to lie to the user. A quick sending graphic, which is replaced with a received graphic would accurately portray the events that are happening. These could easily be iconic, maybe just a differently colored arrow while sending, which fades out when it's sent.