> An Optimistic User Interface is when a user triggers an action and the UI updates immediately, even though there may be a request pending.
This is also called "lying to your users"
> An Optimistic User Interface is when a user triggers an action and the UI updates immediately, even though there may be a request pending.
This is also called "lying to your users"
This is the same principle that multiplayer games use. When a game character is moved in a particular direction, the client shows "optimistic" movement before the server confirms the movement. This is the difference between a playable and unplayable game in many cases.
It turns out, though, that it might take _weeks_ for the cheque to clear, and they reserve the right to reverse the deposit and ding me for an NSF fee at any time.
Users often prefer optimistic processes to ACID trips.
Is optimistic, but is not lying.
But if it make believe something have happened whitout proper feedback....
In the article it describes reverting the state of the component if the action fails, asynchronously. IMO that’s much worse than briefly representing a progress state for a few ms.
Two things.
1. Likes are not a small detail of a social network app
2. If you're handling a failure state when the HTTP request comes back (like the author does), handling the success state is just an `else`