Comment Re:Don't repeat yourself in a multilingual project (Score 1) 170
Online games won't play unless at the latest patch level, for example.
Because the user is using the application during a 2-hour period of having no access to the Internet.
These are mutually exclusive. Online games stop you from doing client side things because they online. An offline application can't know that validation has changed or there is an app update because it's offline. At that point, what do you do, toss out any data the user entered while they were offline?
One easy fix (again): Do your validation on the server end only. Save the data locally, and when the user goes to submit it and it fails, then you throw an error. User doesn't lose any data, and your validation will always be good.
So your suggested workflow is just to let the user enter grossly invalid data for two hours then have the server present pages of error messages once a connection is reestablished.
As I noted above, there isn't really a way around this. Even if I follow your approach, when the client and server versions mismatch because the user was offline they'll get the same pages of errors. An offline user can't get a client update to fix the client side validation because again (drumroll) they're offline.
And, when they come back online, and they get the automatic update, they now have a local user database chock full of invalid data according to local validation. Do you just toss out all that data now because it no longer meets local validation? Or are you intentionally going to punch holes through local validation to grandfather now broken data in?
Boy, I hope your QA team has a large alcohol budget and the world's largest whiteboard for their validation testing matrix.
Hence the growth of Node.
It's true Node is growing, but again, data validation is usually either trivial enough it can be done on the client end in any language, or complicated enough you probably don't want to be doing it on the client end any way.