Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Extreme Server Side Rendering (scd31.com)
28 points by vortex_ape 10 months ago | hide | past | favorite | 5 comments


"I think it would be funny to build a React fork that runs entirely server-side. The virtual DOM could be diff'd, and the diffs could be transmitted to the front-end via XSSR (again, no front-end JS required). I don't think this is very practical but it would be cool."

This is basically Elixir liveview, and it's awesome!


The post postulates:

  New-school SSR is similar to old-school SSR, but it does 
  involve a bit of front-end JavaScript logic. Generally, the 
  way it's implemented is that when the user will interacts 
  with the web page, the JS will make a request to the 
  back-end. Then, the back-end will return some HTML, and the 
  JS front-end will insert that HTML somewhere into the page. 
  This allows us to have dynamic pages, at the cost of having 
  to maintain some front-end logic.
  
  Wouldn't it be nice if there was a better way?
Yes. It's called htmx[0].

0 - https://htmx.org/


HTMX is doing exactly what is being described as "New-school SSR" so I'm not sure how it'd be better?


> HTMX is doing exactly what is being described as "New-school SSR" so I'm not sure how it'd be better?

The key value htmx can provide (and maybe ParsleyJS for forms) is eliminating:

  New-school SSR is similar to old-school SSR, but it does 
  involve a bit of front-end JavaScript logic.
Leveraging HTML5/CSS3/htmx/jQuery/ParsleyJS implies a browser can focus on its primary role - rendering content. When this approach is applicable, there is no "front-end logic" to maintain.


There might be some problems. I would think at this point it might be better to use Telnet and stuff like that instead of HTML.




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

Search: