News for hackers. Stuff that matters.
Re:I Miss Rails by gambler on Friday March 29, 2019 @09:30AM (#19521476)
>Server-rendered used to mean slow and clunky

I don't get why everyone keeps saying this. Is it because of WordPress? In 2005 I used my own MVC framework with ORM and stuff. It was written in PHP. My pages had the usual generation time of 0.03 seconds. And that was with no specialized caching or any crazy optimizations. Even with no AJAX, page loading seemed instant, unless you connected to the server from across the world.

Re:I Miss Rails by _pgmf on Friday March 29, 2019 @09:47AM (#19521624)
I completely agree. In 2008 at my first coding job we used plain php/MySQL with no caching and the sites were responsive. Plus they required like zero maintenance! In 2009 I went to work for a Django shop and was introduced to caching, reverse proxies/wsgi servers, templating, etc. It took a long time to buy in to this way of doing things, as it seemed intentionally complicated for no reason. Over time I've learned to appreciate that there are real benefits, but it wasn't immediately obvious to me. Regarding js templating, spa's, and all that stuff: I've tried to keep my previous experience in mind, and be open-minded about the potential benefits of these technologies. But I haven't seen any as yet.
Re:I Miss Rails by Nikaoto on Monday April 01, 2019 @04:29AM (#19541507)
Serious question. What's wrong with simply having a static directory from which you send html files to the client? I do that all the time with my servers and the load times and the complexity of the project never seems to get out of hand. When the app needs to be highly interactive, I perform simple fetch requests and DOM updates from JS. Am I missing something here?
Re:I Miss Rails by golergka on Monday April 01, 2019 @07:52AM (#19542407)
You (and most web developers out there) don't work on projects that actually need to be SPAs.
Re:I Miss Rails by chasd00 on Friday March 29, 2019 @10:07AM (#19521799)
the lighter text means the post has been down voted correct? Why was the parent post downvoted then? They make a perfect point, there's nothing inherently slow about traditional web apps. There's definitely things regarding the UX that traditional server side web applications can't do vs browser side but they can be incredibly fast.

one nit pick, what does "server-side rendering", and even "client-side rendering", even mean? The browser renders HTML, it's always client side and it's always outside of the scope of application code. Does "rendering" really mean template parsing?

Re:I Miss Rails by digitaltrees on Friday March 29, 2019 @03:32PM (#19524804)
Server side rendering means the server converts a template into a fully formed html page by pulling layouts and partials together, adding JS/css assets, interpolating dynamic sections with data from the database. The response to the browser is html ready to parse and display.

Client side means the layouts, templates, partials, components are on the client and are stitched together their. The server only send data and the client app handles interpolation and generating the html.

Re:I Miss Rails by gambler on Friday March 29, 2019 @10:43AM (#19522092)
>one nit pick, what does "server-side rendering", and even "client-side rendering", even mean? The browser renders HTML, it's always client side and it's always outside of the scope of application code.

This is an excellent point. Both HTML and JSON are string representations of data structures. Both are eventually transformed and converted to DOM.

Re:I Miss Rails by dlandis on Friday March 29, 2019 @11:44AM (#19522644)
> Does "rendering" really mean template parsing?

It's kind of a misnomer; it usually means generating a "renderable" thing (e.g. HTML) , not actually rendering it on the screen because yes the browser does that.