3 ms·
Not everything can be done in a browser. You might want to store user-submitted content in a database, for example. Or you might want to do authentication. You
by crote 3y ago
Not everything can be done in a browser.
You might want to store user-submitted content in a database, for example. Or you might want to do authentication. You might want to provide full-text search in a multi-gigabyte dataset. You might want to provide an interface to something which can't be accessed from a web browser. You might want to validate user-provided input.
All of those require custom code running on a server. So now you have to take whatever data you have on the server, translate it into a well-defined custom transfer protocol, send it to the client, translate it back, and finally turn it into html. And the same for the other direction, but now you suddenly have to do input validation on both the client and the server to prevent anyone creating a custom client from doing anything malicious.
Or you can just turn it directly into html on the server and be done with it. It's a lot less work, and provides basically the same experience for most applications.
- hinkley 3y agoAlso users haven’t had “a browser” for a decade. Between personal and work I have four, technically five, and then some apps on my Apple TV (YouTube in particular). User accounts let me share state between them. There’s no protocol yet that lets you do that on the client, though Apple might be working that way. If you haven’t used the device integration features of OS X and iOS you are missing out. Cut and paste is very, very useful.
- flohofwoe 3y agoYeah, depends on the type of app / webpage of course. E.g. a blog doesn't need any of that, but a webshop does. But there's also a middleground where most of the code runs in the browser, while only some small parts need to run on the server (like login/auth, or a "cloud drive" storage). IMHO this type of web application is currently the most interesting. PS: how complicated that is all depends on the library ecosystem IMHO.