Hacker News new | past | comments | ask | show | jobs | submit login

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!




Agreed, Elixir LiveView is a lot like what @sequoia describes. I use LiveView to handle creating the more complex logic, data handling (and caching) on the server. For UI layout you can get surprisingly far with mostly CSS nowadays with small events back to the server just changing a CSS class here and there. Oddly despite the server round trip, the responsiveness is great.

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.


Right? I use LiveView with Tailwind, and for those little extra interactions, Alpine works amazingly well. Such a dream stack! Alpine was created by Caleb for LiveWire (inspired by LiveView), which is why it works so well too :)



While not nearly as efficient, Turbolinks (and Stimulus for interactivity) is pretty popular.


Another one worth a mention is StimulusReflex https://docs.stimulusreflex.com/

Real-time stimulus + rails.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: