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

Yep, it builds HTML on the server side and sends it to the browser through normal get requests. Instead of constructing HTML in a mix of JS + HTML (JSX) you typically write a mix of Ruby + HTML called ERB.


Doesn't Ruby also have an HTML-over-websocket library that Basecamp built for Hey and released open source? (at least a year or two ago they said they would release it) This would be similar to Elixir's LiveView I think.


Yep, hotwire. It's still running everything on the server in that case though where ruby templates are generating HTML.


So you have to wait for a page refresh any time you do something on the page?


Yep, it's like every other MVC or server side framework. You can still send client side JS for interactivity, and these days there are small jquery-like micro frameworks like petite-vue, alpinejs, stimulus, etc. that are made to sprinkle in interactions where necessary. If you want the smooth SPA-like experience there are systems like hotwire or htmx which effectively hide all the page reloading.


That sounds like a terrible user experience.


You already are used to it. Lots of the web is rendered on server.


Sure, zero-js solutions are fine for marketing pages. But for an application you wouldn't want to wait for a page refresh when doing anything.




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

Search: