2 ms·
The problem with all the "fancy" JS stuff is: people these days totally disable their JS because people have fucked their users over and over again with endless
by mschuster91 11y ago
The problem with all the "fancy" JS stuff is: people these days totally disable their JS because people have fucked their users over and over again with endless heaps of tracking, ads and other nasties. Or their connection has a too high RTT (ohai EDGE!) for downloading 100+ assets in a timely matter.
I have yet to see a JS/* framework that allows me as a full-stack developer to deliver the same content experience (sans interactiveness of course) to clients with or without JS, without having to duplicate templating logic or switch to NodeJS which requires a) a host supporting it, which many "mainstream hosters" don't and b) having to code a server in javascript's callback/promise hell.
- matt4077 11y agoI don't buy your premise: I'm pretty sure the number of JS-disabling users has dropped significantly and we're getting to a point where it's acceptable to require JS. Server-Side rendering is implemented to satisfy search engines (and even that's changing) or to speed up the first page load. Your second point is a tautology. Of course it's impossible to run JS code on the server if you don't want to run JS code and the server and don't want to rewrite it in another language. FWIW, both ES5/6 as well as coffeescript vastly improve 'callback hell'
- warfangle 11y agoWhich mainstream hosters don't? The same ones that only support and will only ever support PHP? > b) having to code a server in javascript's callback/promise hell. Don't really see promises as hell, but with latest versions of Node and this neat little library called co, you can write your async code like this: function doAsyncOne() {} // returns promise function doAsyncTwo() {} // returns promise co(function*() { try { let [resultOne, resultTwo] = yield [doAsyncOne(), doAsyncTwo()]; } catch(e) { // one of the promises rejected, handle it } }); Generators as coroutines are the poor man's async/await.