Re:HMPL – template language for displaying UI from server to...
by _heimdall on Friday August 09, 2024 @10:46PM
(#41206943)
My rule of thumb is to render HTML where the state lives.
When state lives on the server, usually in a database, leave your templating engine there and ship HTML.
When state only lives in the client, think temporary UI state or animations, that rendering needs to happen in the client.
At least for the kinda of sites and apps I build, that almost always means most of the rendering is done on the server and client rendering is so small in scope that I don't need more than plain old JS or a web component.
When state lives on the server, usually in a database, leave your templating engine there and ship HTML.
When state only lives in the client, think temporary UI state or animations, that rendering needs to happen in the client.
At least for the kinda of sites and apps I build, that almost always means most of the rendering is done on the server and client rendering is so small in scope that I don't need more than plain old JS or a web component.