Conversation

server side rendering (it’s still all javascript)

1
0
1

I don’t know about you but I don’t have a javascript budget of 300kiB for a hello world app

1
0
1
Edited 2 years ago

average modern web framework: 2MiB of javascript

what really needs to be made is a web framework that runs on the server, generates html which requires no javascript (although is definitely enhanced by javascript), and turns into a lightweight web app after it loaded (really all it does is load html snippets from the server and replace divs with it)

2
0
2

@charlotte Sounds very hacky from a web application developer standpoint haha. Maybe for something really small where you don't need a lot but give me a clean API anyday. xD

The point in having rendering in the frontend code is actually to have a responsive applications with minimal communication after loading. I agree though it isn't always done right and not all devs pay attention to how large the dependencies they load are or they need them at all. ;P

1
1
0

@maruno i mean the rendering code is already on the backend so why duplicate more than is necessary on the front end? it’s going to increase loading times, memory requirements, and performance

having an API and actual SSR isn’t mutually exclusive, in principle the API could use the same endpoints with accept: application/json

2
0
0
Edited 2 years ago

@maruno it imo needs to be a balance but if new content needs to be fetched there really isn’t a reason for the server to not return html as an option

0
0
0

@charlotte Quite often no, there is no rendering code on the backend. At work got some, but that's considered legacy code. The frontend contains the templates and the backend only deals with data.

Why waste resources and money on doing something the client can do? I'm way more an advocate for keeping as much local as possible and only synchronising data storage to the cloud and only when necessary. Keeping as close to a local app experience as possible.

1
1
0

@maruno i’m currently slowly working on my new website and basically one strong requirement is basically is that the content of the website is in the downloaded html, and that read-only features work without javascript. Imo a good rule because a lot of websites have some amount of “content pages” which offer only limited interactivity

1
0
1

@charlotte Yeah, that's definitely good. Just static content shouldn't need much code at all and that's a very valid use case :)

0
0
0

@charlotte something like astro or qwik?

0
0
0