4 ms·
Really confused by the terminology. I assume in this context "rendering" does not mean translating an abstract scene description into pixels on screen, but some
by rsp1984 7y ago
Really confused by the terminology. I assume in this context "rendering" does not mean translating an abstract scene description into pixels on screen, but something else.
Can somebody shed some light on this?
- ralusek 7y agoConstructing and painting the DOM.
- bgrainger 7y agoNo; "Server Rendering" is creating an HTML document as text, then serializing it to bytes and delivering it in an HTTP response. There's no painting in this scenario.
- bgrainger 7y ago"Rendering" in this context is turning an abstract representation of the content of your page (or state of your application) into HTML (either as bytes delivered in an HTTP response from a server, or as DOM nodes created by JavaScript on the client). For Hacker News, "Server Rendering" is taking the top 25 stories, creating a large string containing all the HTML tags, then serializing that to a byte stream. A hypothetical "Client Rendering" alternative to HN might be downloading a JSON chunk containing the data about the top stories, then using a JavaScript framework to create DOM nodes in the user's browser that create the same document client-side.
- rsp1984 7y agoAh got it, thanks for the concise explanation.
- snaky 7y agoIn a web context, rendering is populating html template with data.