4 ms·
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 ty
by qbasic_forever 5y ago
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.
- jb1991 5y agoDoesn'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.
- qbasic_forever 5y agoYep, hotwire. It's still running everything on the server in that case though where ruby templates are generating HTML.
- robertoandred 5y agoSo you have to wait for a page refresh any time you do something on the page?
- qbasic_forever 5y agoYep, 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.
- robertoandred 5y agoThat sounds like a terrible user experience.
- jb1991 5y agoYou already are used to it. Lots of the web is rendered on server.
- robertoandred 5y agoSure, 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.