|
|
|
|
|
by edisonywh
2167 days ago
|
|
Have you heard about Phoenix LiveView? Sounds like what you want. It's a Rails-like framework written in Elixir (piggyback-ing off 30 years of BEAM), and LiveView changes the game by allowing you to build rich front-end application from your backend. The way it works is that it serves you static HTML on initial load (yay SEO), and then it establishes a websocket connection to the server (very efficient thanks for BEAM), and every subsequent user interaction sends a event_name which you handle on the backend, and the backend respond with only the changed data (Phoenix can intelligently track your changes so it only sends what has actually changed), and then morphdom on the browser side patches things onto front-end. You get the full power of interactivity but you barely have to touch any front end at all (and if you really do, it plays super well with AlpineJS, so you still get that escape hatch). All in all, LiveView is amazing (and the surrounding technology), I just wish more people know about it! |
|
Here’s a demo I built for a small wrapper around Bulgaria CSS. Running on a tiny VPS: http://lacritch.xyz/
Now Elixir/BEAM is an excellent platform for this as the average and 99.9th percentile response times are really consistent. So your UI interactions don’t usually take 70ms with every Xth one taking 400 ms, which would be really annoying.