3 ms·
> Surely that will dramatically increase server bandwidth LiveView can actually decrease B/W and load, because the HTML diffs are more efficient than sending J
by ramchip 5y ago
> Surely that will dramatically increase server bandwidth
LiveView can actually decrease B/W and load, because the HTML diffs are more efficient than sending JSON, and the statefulness means you don't need to constantly refetch user information from DB/cache, etc. The details depend on your app and how carefully you optimize it, but it's far from being an unconditional "dramatic increase".
> If you don't want to write JavaScript, you probably shouldn't be building interactive applications for the web.
That's gatekeeping and just plain insulting.
- lsalvatore 5y agoJavaScript is the only language browsers will run. It's not gatekeeping to suggest that you have to learn and use JavaScript frameworks if you want to build web applications- it's a fact.
- ramchip 5y agoYou can write full-blown SPAs in ClojureScript or Elm, or use the tools we're discussing here like LiveView. I've had great success with an LV app with minimal JS. The rendering is all server-side in Elixir, plus a few lines of JS hooks for the bits that truly need to happen on the client for a good experience: TZ conversion, countdown timer, table sorting, Chart.js rendering. No framework needed. The user doesn't notice if a transition takes 100ms because LiveView is fetching an HTML diff from the backend, or 100ms because React is doing an AJAX query to a JSON API, it's the same end result.