Live data from Hacker News

Phoenix LiveView 1.0.0 is here

phoenixframework.org

41–50 of 142 posts

Re: Phoenix LiveView 1.0.0 is here

#42

We've built many production apps using LiveView. It has some limitations inherent to its design, namely the need to have a semi-reliable WebSocket connection to be able to effectively use the app, but with this tradeoff come a number of advantages: - code generation makes for an extremely productive experience that makes standing up an actually-useful application very fast - Elixir is a great language, especially for…

Thanks! Love to hear it! Note that LiveView also fully works on the LongPoll transport (which is enabled by default), and we have automatic fallback to longpoll support if websocket fails for whatever reason. So even in the case of obscure websocket issues (like some "corporate proxies" doing weird things like allowing the 101 websocket upgrade then just dropping things into the ether), things should be good. In my experience 1-2% of traffic seems to have websocket issues today for the production apps I work on.

To your point though, LiveView indeed requires a semi reliable connection for reasonable UX, but there is a ton of nuance to this topic that is usually missed from the discussions. Apps should more or less degrade similarly to SPA's that are going to the server. For robust UX on unreliable connections you need offline/local-first SPAs, and in my experience the vast majority of SPAs do not handle this. Failing that, most SPA frameworks seem to place the optimistic UI/rollback concerns on the developer. In fact most degrade quite poorly on bad connections. It goes against folks intuition, but even with degraded connections LiveView does better than people imagine because we have the existing connection established and don't need to go through the overheard of reestablishing things, and our payloads are generally smaller.

Annecdata of me driving through the mountains with spotty cell tethering and browsing facebook vs a LiveView app: https://x.com/chris_mccord/status/1799100642654638543/video/...

Re: Phoenix LiveView 1.0.0 is here

#43
The combination of Elixir, Phoenix & LiveView really is incredible: "What about supporting production hot code upgrades where browsers can auto re-render anytime CSS stylesheets, images, or templates change – without losing state or dropping connections? Sure!".

No replacing servers to push code changes, no telling people to logout & back in to see the changes. Crazy.

Re: Phoenix LiveView 1.0.0 is here

#44
Congrats! This stable release is huge.

I built my (unfortunately) failed startup using LiveView for ~18 months. It was actually really good to work with and a great product experience.

I ended up integrating React into it as well for some particularly complex / mature libraries (react-grid-layout, WYSIWYG editor). Pretty seamless connection to backend LiveViews, and I tried to keep everything in LV as possible.

The biggest difficulty was hitting problems that I had solved 50 times in React, and had to solve from-scratch in LiveView. Once I figured out a problem, I could re-use it easily.

Re: Phoenix LiveView 1.0.0 is here

#45
Thank you Chris and the Phoenix team for all your amazing work! I’ve been using LiveView in production since only a few months after the first version was released in 2019 and it’s been fantastic from the very beginning and a joy to develop with :-)

For anyone who doesn't remember, this is the keynote at ElixirConf EU in Prague where Chris introduced LiveView to the community: https://www.youtube.com/watch?v=8xJzHq8ru0M

Re: Phoenix LiveView 1.0.0 is here

#46
Congrats to everyone involved!

LiveView is one of those things that almost seems like it was "discovered" rather than invented. Like, in the early days Phoenix was just a "better rails", but it had this neat little "channels" functionality that Rails couldn't really manage because of ruby limitations. But "channels" gradually got fleshed out and then lo and behold an early version of LiveView was built on it. But while LiveViews were amazing, they were kind of disjointed with the more standard static views (or "dead" views as the community often calls them, which I really dislike). And over time things were updated so you could share code between live and static views, finally culminating in Phoenix 1.7 which has a whole new layout and philosophy on building web apps.

Phoenix 1.7 feels radically different to me from everything before, and a clean break from its Rails tradition. But it all kind of got there incrementally in ways that make sense. It feels like as soon as Elixir was created, this new way of organizing and building web apps was there all along in the rock, it just took a decade of chipping away at it to reveal.

Re: Phoenix LiveView 1.0.0 is here

#47

Phoenix creator here – excited to finally have shipped this! Happy to answer any elixir/phoenix/liveview questions. In case folks missed it, buried in the blog post is a new installer that lets folks try out elixir/phoenix in seconds. It installs elixir and generates a new phoenix project from a single command: osx/linux: $ curl https://new.phoenixframework.org/yourappname | sh windows powershell: > curl.exe -fsSO ht…

Thank you for everything!! I've shipped quite a few successful apps to clients on Phoenix ever since the beginning, and am about to launch a startup on it. It's truly changed my career more than maybe any other library.

Re: Phoenix LiveView 1.0.0 is here

#48

Phoenix creator here – excited to finally have shipped this! Happy to answer any elixir/phoenix/liveview questions. In case folks missed it, buried in the blog post is a new installer that lets folks try out elixir/phoenix in seconds. It installs elixir and generates a new phoenix project from a single command: osx/linux: $ curl https://new.phoenixframework.org/yourappname | sh windows powershell: > curl.exe -fsSO ht…

Maybe this isn't the best place for feedback, but I was inspired to give this a go. Sadly it didn't work out. First error was:

  sh: line 1: Application: command not found
By visiting https://new.phoenixframework.org/test-elixir-app, I could see the proper output:

  Application name must start with a letter and have only lowercase letters, numbers and underscore
So I changed to test_elixir_app, and got this output:

  downloading https://github.com/elixir-lang/elixir/releases/download/v1.17.3/elixir-otp-27.zip
  fedora is not supported
This was a spur of the moment thing, so maybe I'll try from an Ubuntu machine or something another time, but the friction was unfortunate. Grats on the launch though, the demo gif of using the project installer looked great.

Re: Phoenix LiveView 1.0.0 is here

#49

Phoenix creator here – excited to finally have shipped this! Happy to answer any elixir/phoenix/liveview questions. In case folks missed it, buried in the blog post is a new installer that lets folks try out elixir/phoenix in seconds. It installs elixir and generates a new phoenix project from a single command: osx/linux: $ curl https://new.phoenixframework.org/yourappname | sh windows powershell: > curl.exe -fsSO ht…

Congratulations!! The much awaited is finally here.

With Liveview the network gap between the client and the server dissolves. It's just magical.

Thank you Cris, Jose and the whole team for making the lives of developers easier.

Re: Phoenix LiveView 1.0.0 is here

#50
post #31

Earlier quoted context omitted.

Genuine question: wouldn’t server-based frontend JS apps be susceptible to the same issue? Of course, if your JS app isn’t server-based and can run non-trivial logic on the client, then it’s going to work better than a LiveView app.

You can use a JS service worker and local storage. This is how Firestore works, for example

Someone made a PoC app (todo list) that integrates LiveView with offline support and conflict resolution via CRDTs.

https://liveview-svelte-pwa.fly.dev/

It's a toy app obviously, but I was impressed with the potential of so many technologies being integrated with each other (It even has Svelte in the mix via LiveSvelte[1]).

[1] https://github.com/woutdp/live_svelte

Post reply on HN