Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have an issue with

    The geneal idea of HTMX is that your HTML will be rendered by the backend — à la Server Side Rendering.
To me this phrase makes no sense, what's the thought process behind this meaning of "render"? The only place HTML is "rendered" is in a browser (or in a user agent, if you prefer).


>, what's the thought process behind this meaning of "render"?

It's another use of "render" relative to the server such as converting non-HTML data inside database tables, json, etc --> rendered into HTML:

https://www.google.com/search?q=SSR+server+side+rendering

Many different perspectives of "rendering":

- SSR server-side rendering : server converting data to HTML

- CSR client-side rendering : e.g. client browser fetching and converting JSON/XML into dynamic HTML

- browser-engine rendering : converting HTML to operating system windowing GUI (i.e. "painting")


"render" as in being templated with server-side data/logic.

See also Server Side Rendering (SSR) which uses the term rendering in the same way.


Django uses a render() function to convert a template to HTML, then return it as an HTTP response.

One of the many dictionary definitions of the word also appears to be to "give an interpretation or rendition of" something.


Imagine you have a markdown file.

You could "render" it to html with pandoc, then serve the html from disk by a static web server.

This would be "build time" html - it's html before it's read by the server.

Then you could setup a cgi script, php-script or an application server that converted markdown to html - then sent it to the client. This would be server-side rendering.

Finally, you could send some html+javascript to the client that fetch the raw markdown, then generates html on the client. That would be client side rendering.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: