3 ms·
>reuse of patterns and libraries While this sounds alluring, in practice I think it would mostly be limited to the kind of thing where you check something clie
by xamuel 12y ago
>reuse of patterns and libraries
While this sounds alluring, in practice I think it would mostly be limited to the kind of thing where you check something client-side (like whether a username meets the requirements) and then re-check it server-side because security 101.
Client-side code is about displaying things, turning JSON into buttons and widgets, etc. There is no point having that on server-side. The server does not have a human user clicking buttons and scrolling bars.
Server-side code is about performing calculations and facilitating communication between different clients. If these can be done client-side, then there's no reason to do them server-side in the first place.
>An investment in vanilla JS will pay out in long term
This is true, but a lot of JS investment is not in vanilla, it's in whatever framework is popular that week, and next week that framework will be dropped like bellbottom pants.
- falcolas 12y ago> Client-side code is about displaying things Actually, JS developers are learning that this is frequently better done on the server; there are more and more articles every week about the benefits of pre-rendering the application page on the server side, then letting the client JS take over and make the server generated code responsive. I believe the term being used is "isomorphic" javascript. However, since the Node.js server is inherently single threaded, the cost of generating these templates server side impacts every connection being handled by that particular instance.
- xamuel 12y agoWhat JS developers call "pre-rendering" is what everyone else has been calling "not a static webpage" since forever. It takes willful blindness to ride around on a bike with square wheels, ignore the round-wheel bikes around you, then eventually switch to round-wheel yourself and act like you invented it and it's the next big thing.
- username223 12y agoWell, some of these guys are also riding single-speed fixies over a century after the invention of the derailleur and freewheel. I'm not hip enough to know if (extraordinarily dangerous) penny-farthings are coming back yet.