Re:Idempotence: What is it and why should I care?
by digitaLandscape on Monday August 20, 2018 @10:37PM
(#17806432)
I don't like this because in practice sites usually fail to re-enable the submit button if something goes wrong. Just let the user submit multiple requests if they want to retry, don't take that away from them, just make it harmless.
[ Parent
| on HN ]
Re:Idempotence: What is it and why should I care?
by jen729w on Tuesday August 21, 2018 @05:31AM
(#17808233)
Newbie programmer here, but even I am already implementing finite state machines which handily fix this sort of issue.
Any sort of UI without them now feels archaic.
Re:Idempotence: What is it and why should I care?
by hood_syntax on Tuesday August 21, 2018 @08:52AM
(#17809082)
Agree 100%. If you don't have explicit state transitions in a UI, you're asking for trouble. I think some people don't realize how much harder they make it on themselves by not setting clear boundaries; they see the up front cost and balk, when it saves a non-trivial amount of headache in the future, not to mention reducing mental overhead when you've got the structure hashed out.
Re:Idempotence: What is it and why should I care?
by digitaLandscape on Tuesday August 21, 2018 @11:13AM
(#17810301)
Meh. The logic still applies: on a bad network, the first request can hang for half a minute when a retry would get lucky and go through immediately.
Don't handcuff your users for no benefit, just because you can't write a well-behaved backend.