4 ms·
A backend can just say ‘no’ if it gets a number in a format it doesn’t like. If a user enters a number incorrectly on a frontend, a frontend can’t just say no.
by thrashh 5y ago
A backend can just say ‘no’ if it gets a number in a format it doesn’t like.
If a user enters a number incorrectly on a frontend,
a frontend can’t just say no. It might have to try its best to parse the number, or if it can’t, the error has to be presented in a user friendly way. A frontend can’t just throw an exception and say Bad Request.
- iamricks 5y agoOr you just send the input to the backend and have the backend tell the frontend to tell the user "backend said no"
- kennywinker 5y ago> If a user enters a number incorrectly on a frontend, a frontend can’t just say no. Followed by the distant sound of enterprise, banking, and government frontend devs laughing.
- foo_barrio 5y agoI disagree. Have you ever worked in finance? Inconsistent or unexpected number/date formats have to be dealt with. And to add to it, the formats can be binary and not just text that you can look at it and sort of "figure it out". Often times these files are coming from other large institutions and getting them to fix their data takes days if ever. In the mean time there is daily processing that has to get done in order to trade at the next day's opening. A system can't just reject data it doesn't like.