7 ms·
I have a similar aversion to JS as the author, but unfortunately it's still the best tool for the job in manipulating the DOM. Phoenix LiveView looks really co
by everdev 7y ago
I have a similar aversion to JS as the author, but unfortunately it's still the best tool for the job in manipulating the DOM.
Phoenix LiveView looks really cool. Under the hood though it's injecting JS that diffs the current DOM and the new DOM and renders the changes rather than the entire tree. At the end of the day, it's still a JS enhancement.
- ashton314 7y agoYes, a JS enhancement that weighs less than 30 KB. I’ll take that any day over a >100 KB React app.
- snek 7y ago...and end up keeping a websocket open, transferring far more than 30kb or even 100kb in state changes over the lifetime of the app, while also using up the devices battery and data limits? friendly reminder that 100kb of js can be cached on the device, while a stateful websocket obviously can not.
- Can_Not 7y agoWhile we're here, Server Sent Events (SSE) over HTTP2/3 (which websockets doesn't support) is apparently more battery friendly for phones. Symfony recently got support for SSE using the mercure protocol, it would be lovely if more backend frameworks had first class support for SSE.