Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Froot75547yWhy is that bad?
You validate in front end so you can give instant feedback without having to wait for network and server
You validate in backend for security
If you do it in node.js then you can just make a validation module and import it into both front and back end. No duplication of code -
@Froot and you should always do both in web development. Always pinging the server to see if it's broken is slow
-
I'm not saying that is a bad thing... It's just it's odd for me because I have a .Net background... You can figure out why :D
-
Froot75547y@iam13islucky You don't need every client pinging your server for that. You could just have another tool or whatnot do that. Or do you mean to show a notification to the client? I'd think it's enough to let the client know once he needs to send something. After all, your server being down should be quite a rare occurance
-
@Froot it's more a UX thing. If they have to wait for the server to tell them if it's valid, it seems much slower, because it is
-
Froot75547y@iam13islucky I don't get it. That's why you validate client side first and respond from there if it's invalid. That's what I said didn't I π
Or did I misunderstand you? π
Related Rants
When you learn that in SPAs you do validation in the back and front end -.-
undefined
spa
angular