3 ms·
> [SPA Pro:] frontend is decoupled from backend I was very surprised to read that. Very often validation and context-sensitive behaviour needs to be performed
by sago 9y ago
> [SPA Pro:] frontend is decoupled from backend
I was very surprised to read that.
Very often validation and context-sensitive behaviour needs to be performed on the client and (since you can't trust the client) on the server. You can certainly argue this is better user experience: you don't have to wait for a server round-trip before finding out an action is invalid, but it's hardly decoupled.
Isn't this a part of why node is so popular as a server platform? The stack is now so deeply coupled, it is very beneficial to reuse code.
- Udik 9y agoRepeated validations, while not DRY, aren't a case of coupling. They seem more a case of de-coupling, as they're needed for the application and the service layer to work independently from each other. While in non-spas your server receives from the client an extremely specific blob of page state plus user input and has to rebuild a specific new page with state updates and/or error messages.