You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Society has evolved past the need for Jinja templates #3
As a computer engineer, I do not understand why server side rendering engines, such as Jinja, are "cringe." What makes them so? Does this mean that Gin should be avoided for serverside rendering as well?
So real talk, serverside rendering has it's uses, if it's rendering specific parts of a page and not the whole page.
tl;dr: All in all, clientside rendering with backend data parsing is the modern strategy, it creates a better user experience and reduces performance bottlenecks. Serverside rendering creates a single bottleneck for page display and usage.
Generally the modern pattern for web development is to build a backend API with a series of endpoints, and a clientside frontend that makes multiple API endpoints to render the page in pieces.
The reason for this is that serverside rendering a full view creates a single bottleneck. Let's say you have a app like Conditional with hundreds of results being rendered at once. In order for the page to even load, the sql needs to complete, the python needs the parse it, then it needs to render the html, and then the browser needs to load that HTML over the wire. That's a lot of steps just to load a page.
With clientside rendering (JavaScript, react, vue, whatever) two things happen in parallel. The page itself loads and has 0 data, but at least you have a visible page with buttons and the frame. The frontend right away calls a backend API which calls SQL and parses with python. But now that's it. There's no HTML rendering and the data is smaller to send over the wire. Now the page takes that data and renders it. There's less data to render since the frame of the site is rendered, so it's quicker.
This is not to say serverside rendering never has a place, it just shouldn't be a default like CSH has made it (partially my fault) and it shouldn't be an all or nothing serverside rendering like this.
Activity
WillNilges commentedon Oct 23, 2022
As a computer engineer, I do not understand why server side rendering engines, such as Jinja, are "cringe." What makes them so? Does this mean that Gin should be avoided for serverside rendering as well?
devinmatte commentedon Oct 23, 2022
So real talk, serverside rendering has it's uses, if it's rendering specific parts of a page and not the whole page.
tl;dr: All in all, clientside rendering with backend data parsing is the modern strategy, it creates a better user experience and reduces performance bottlenecks. Serverside rendering creates a single bottleneck for page display and usage.
Generally the modern pattern for web development is to build a backend API with a series of endpoints, and a clientside frontend that makes multiple API endpoints to render the page in pieces.
The reason for this is that serverside rendering a full view creates a single bottleneck. Let's say you have a app like Conditional with hundreds of results being rendered at once. In order for the page to even load, the sql needs to complete, the python needs the parse it, then it needs to render the html, and then the browser needs to load that HTML over the wire. That's a lot of steps just to load a page.
With clientside rendering (JavaScript, react, vue, whatever) two things happen in parallel. The page itself loads and has 0 data, but at least you have a visible page with buttons and the frame. The frontend right away calls a backend API which calls SQL and parses with python. But now that's it. There's no HTML rendering and the data is smaller to send over the wire. Now the page takes that data and renders it. There's less data to render since the frame of the site is rendered, so it's quicker.
This is not to say serverside rendering never has a place, it just shouldn't be a default like CSH has made it (partially my fault) and it shouldn't be an all or nothing serverside rendering like this.