3 ms·
Turbo[0] has been solving this for years. Quite the contrary, front-end frameworks have started to think "sending JSON is good, but actually sending HTML could
by pil0u 3y ago
Turbo[0] has been solving this for years. Quite the contrary, front-end frameworks have started to think "sending JSON is good, but actually sending HTML could be great!".
DHH's presentation[1] during Rails World 2023 is quite interesting in that regard, I recommend you give it a go (start around minute 16). I am actually very excited with his vision of the web.
[0] https://turbo.hotwired.dev/ https://turbo.hotwired.dev/
[1] https://www.youtube.com/watch?v=iqXjGiQ_D-A https://www.youtube.com/watch?v=iqXjGiQ_D-A
- revskill 3y agoNo, by just sending HTML over the wire doesn't make your HTML interactive the way you want.
- Alifatisk 3y agoWhy? The difference here is that the computation is done on the server side. The end result is still the same, just different approaches.
- revskill 3y agoYou need a "hydration" process to hydrate all event handlers. So only html doesn't buy this argument right ? And do not tell me to "findMyStateFromADomNode", i don't store state in the DOM.
- Alifatisk 3y agoI think Turbo surgically replaces parts of the DOM with the new response from the server.