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 the web, and using it to render the frontend feels like having the full power of the language plus the simplicity of HTML (with little/no writing JavaScript)
- it's extremely efficient since only tiny changes are sent over the WebSocket when data is updated on the server
- you're already using WebSockets, so adding any kind of real-time functionality is very easy (chat, notifications, game state)
Because of the separation of concerns by convention (i.e. keeping business logic in Contexts), it's also a very viable pathway to build a webapp using LiveView first, and serve an API once you need other types of clients (native apps, API consumers) with minimal changes. Ecto is also great to use for validations, and having that available for "frontend" code is a pleasure. It's also great to be able to have backend and frontend tests in Elixir.We've hit some bugs and gotchas over the years leading up to this 1.0 release, but it has long felt like a stable, well-built library that keeps our codebases simple and maintainable, which lets you move fast.
Congratulations to Chris, Jose, and all the other wonderful contributors!
Now there’s some good news!
I’ve been using LiveView for years now and couldn’t be happier with it. It’s a joy to work with, and has reinvigorated my love of web development. I’m so blazingly productive in LV it’s unreal.
I try not to be too self-promoey on HN but this feels like as good as time as any: if this v1.0.0 release makes you want to finally learn LiveView, I humbly recommend my own course at http://learnphoenixliveview.com. Get 20% off with the code HACKERNEWS.
I struggled to find good learning materials when I was starting out, so I’ve tried to rectify that problem. I hope that I can get more people over the initial learning curve because as far as I’m concerned, the more people get familiar with this awesome framework, the more everybody wins.
Most expensive part of the typical web app is the coordination cost between front and backend devs. Thus the rational to have 1 dev implement full stack. But the trade-off for coordination costs are heavy context switching and knowledge costs to know both ends. Neither option is very ideal and most companies have accepted the coordination costs.
But LiveView just ignores these problems and does full stack without the heavy costs. Elixir/Phoenix/LiveView is a tool-set for maximizing how far one dev can go.
You'd think this would be a selling point in many companies: to have less devs ship more features but those heavy SPA stacks let middle managers rationalize hiring bigger teams. LiveView is for shipping - not stalling.
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.
I wrote my thoughts on the LiveView 1.0 release: https://dockyard.com/blog/2024/12/03/phoenix-liveview-goes-1...
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.
Congratulations to the team and a tremendously big warm hug for creating something that makes my professional life easier and joyful.
Elixir is terrific, never feel like the language is slowing me down whatsoever.
The tools you need are unsurprising and boringly in your face. Oban background jobs, auth, encryption, the works.
The tools for your day to day are polished and immediately useful. mix ecto.reset, seeds.exs, mix test, mix format, mix compile --force to see warnings. Just everything right there in your fingertips and works unsurprisingly.
Performance to the point where you won't ever really worry about it until you've made it big. Literally using 275MB right now and chilling. Sub 100ms response times.
All this to say, give Elixir and Phoenix a try. It's been the best decision of my professional career to try it out in 2016.
Something I love about LiveView that is not mentioned often I think is how easy it makes full stack asynchronous processes.
Because it is so ludicrously easy to send an asynchronous event to a user's browser from the backend, it helps avoid the temptation to synchronously wait in the browser for the backend to finish a long process, which helps avoid creating big chains of synchronous calls on the backend which can cause so many issues.
Congratulations to the team!! I've been following for some time and love a good DX story.
I'd love to get some commentary from any active users on tradeoffs re: adopting tech like LiveView vs the community size and scale of JS land.
For example, JS land benefits massively from libraries like ProseMirror or even any of the more advanced CRDT libraries like Loro or Automerge. How about the AI story?
Is there a clear path to adopting this JS-based tech? Is it not needed? Would love to get a better understanding of the tradeoffs from folks who live in both worlds.
So much is right about LiveView. Thank you for all the work.
A remaining opportunity is a beautiful component library like a shadcn. You can dunk on the complexity of JavaScript, but every choice has tradeoffs and a huge advantage of that ecosystem is you have amazing front end engineers doing beautiful, accessible UI work.
Just look at the demos of LiveView on their own site. Pretty rough by comparison.
It’s not to take away from the effort. Truly enjoyable to develop in. Just to point out there is an even higher level to reach next.
LiveView is super exciting and extremely productive developer experience. One thing that I hope future versions can help address is what I call the "elevator" problem, in that if I'm using a LiveView app on an elevator (or in my case at Costco), it becomes unusable as the connection gets too flakey. While I get offline support will never happen, maybe better support for unreliable connections would be fantastic, though I get how that could be against the ethos of what LiveView is trying to do.
Hats off to phoenix team! I've been working with Elixir and Phoenix for quite a while, it just brings joy to work with and pretty fun as well :)
Getting to 1.0 of LV is huge and it finally happened!
Next thing is LiveView Native getting support for android and I'm never leaving this ecosystem ever. (at least for web/mobile dev heh)
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
6 years, what a journey. Still remember these first demos :)
I think this is my favourite piece of tech. And a lot of success stories, but would also love to hear if anyone ran into huge problems and had to ditch it? There are some footguns but overall I loved writing apps with LiveView, feels like magic.
LiveView has been a pleasure to work with, I jumped on the train only recently with a personal project, and once you get the hang of it, it feels like absolute magic.
That’s exciting! Is there a summary of what’s new in 1.0 somewhere? Usually the version announcements contain an overview of the most important changes, but this one is more of a retrospective and general overview apparently.
We are very happy with Elixir and Phoenix at Felt and have multiple internal apps built via LiveView, which I'm confident would take weeks more to build with anything else. Congrats to the team!
Has anyone tried both LiveView and say Vaadin Flow to compare them? I'm using Vaadin now on a project and it's pretty great so far with Quarkus. The app is also only using like 200mb of memory with production traffic, and I have a compiled language to work with. That's the main thing I'm waiting for with Phoenix...
Congratulations to the Phoenix team! I've been using LiveView since before v0.1 times (pulled it directly from GitHub into my production app, March 2019-ish) and it hasn't disappointed me a single time. Sure, it was rough around the edges, but it worked and has been working well ever since pre-0.1. The v1.0 release is an amazing milestone for a project and an awesome team that has come a really long way. I can't thank them enough for allowing me to build reactive production apps, big and small, with only a handful of people or just by myself. Thank you thank you thank you and here's to you. Cheers!
LiveView is so nice for full stack development, it's a wonderful palette cleanser after a day of enterprise programming.
I can attest to its JS interoperability. I have a project that streams data realtime into a liveview page that uses a combination of ag-grid, maplibre-gl, vega+lite, and Google's model-viewer all at once. All it takes is a little bit of JS plumbing to handle create and updates.
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.
I still remember my gateway to Elixir, Dave Thomas' book on pragprog. And then his course. And I still remember how intrigued I was by the sentiments expressed by Dave, bringing back the joy of writing code. Which I see echoed in many comments here, and to whom I fully subscribe. Congratulations to Chris, Jose and team!
How's the remote job market for elixir?
I'm currently a full stack web dev using functional typescript, but leaning into Elixir world.
I make 100k more or less in Europe as an independent contractor/freelancer, I'd be happy to jump on Elixir/LV but not at a pay cut.
I build internal web applications for companies in the transport industry, and I have considered to try out Phoenix LiveView for my next project ( I have never used Phoenix or Elixir). Everyone praises the DX but I'm conserned about the requirement of constant internet connection. What happens if a user enters a tunnel where there are no connection? Will the app just crash or are there ways to handle this better somehow?
I guess the main reason for using web sockets is to allow async?
I've implemented similar designs for several projects; but I've been piggybacking updates on regular http requests, clicking a button etc.
I just put the page state in a LIFO with a big enough max limit on the server, clearing out anything older.
You do have the limitation of being stuck with the sever that answered the original request, but erlang should be a good platform to fix that.
anyone with experience who can compare LV and Blazor?
I recently worked on a project where I created an elixir endpoint that handles websocket connections and did all the coordination manually with OTP. I'd like something like Phoenix that would give me an easy way to handle websockets without necessarily needing the phoenic ui stack. Is the underlying websockef functionality available as a seperate module or minimal Phoenix powered server
6 years, holy guacamole, good job Elixir community!
Congratulations to Chris McCord and anyone who worked on Live View, what a ride since the first public version in 2019.
Although I sadly stopped using Elixir/Phoenix/LV for new projects I still have some in production that I was waiting for the 1.0 release to update.
Congrats! I’ve been waiting for the stable release since I saw the keynote https://www.youtube.com/watch?v=FADQAnq0RpA
One day, I hope, I am going to get around to learning Phoenix, and that time from the Phoenix docs/website itself. Perhaps I can also find a job to learn on the job. That would be great.
Any thoughts on hosting?
I'm attracted to JS+Cloudflare because hosting seems predictable and reasonably priced.
Do people have good recommendations / experiences with hosting?
Late to the party but congrats on the release and thanks for all the work everyone put into Liveview, its truly a marvel.
Congratulations!
Any plan to support native iOS & Android? I will love to consider Liveview as an alternative to our Ionic+Capacitor setup
Any collaboration or plans for Gleam support?
Is this the GWT for Elixir?
Congrats! Love Phoenix and absolutely love LiveView
Congratulations! That's a great milestone
Congratulations to all !!!
I love Phoenix
"HTTP can go away"... uh, then how does the web client and server communicate with each other?
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:
windows powershell: You can visit those url's directly to see what the scripts do. It extends the official elixir prebuilt installers: https://elixir-lang.org/install.sh and https://elixir-lang.org/install.batedit: You can see it in action here: https://x.com/chris_mccord/status/1864067247255306332
Of course we also have non |sh installation guides if that's what you're after: https://hexdocs.pm/phoenix/installation.html
Now that this is out, I'm looking forward to put together a few new demos. What would folks like to see? Happy hacking!