by bcardarella on 12/3/24, 10:28 PM with 140 comments
by chrismccord on 12/3/24, 11:46 PM
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 https://new.phoenixframework.org/app.bat; .\app.bat
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!
by estreeper on 12/3/24, 11:44 PM
- 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!
by arrowsmith on 12/3/24, 11:16 PM
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.
by mrdoops on 12/4/24, 12:08 AM
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.
by losvedir on 12/4/24, 3:17 AM
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.
by bcardarella on 12/3/24, 10:40 PM
by sb8244 on 12/4/24, 3:09 AM
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.
by sergiotapia on 12/4/24, 12:03 AM
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.
by liampulles on 12/4/24, 8:21 AM
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.
by obeavs on 12/3/24, 11:24 PM
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.
by mrcwinn on 12/4/24, 3:48 AM
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.
by mike1o1 on 12/4/24, 12:22 AM
by sysashi on 12/3/24, 10:48 PM
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)
by pentacent_hq on 12/4/24, 3:11 AM
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
by pawelduda on 12/4/24, 12:44 AM
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.
by BobbyMcWho on 12/3/24, 10:40 PM
by mfsch on 12/3/24, 11:23 PM
by cancan on 12/3/24, 10:58 PM
by winrid on 12/4/24, 3:54 AM
by pjullrich on 12/4/24, 8:45 AM
by wkrp on 12/4/24, 5:13 AM
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.
by abrookewood on 12/4/24, 2:45 AM
No replacing servers to push code changes, no telling people to logout & back in to see the changes. Crazy.
by dantodor on 12/4/24, 12:26 AM
by epolanski on 12/4/24, 5:07 PM
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.
by cambaceres on 12/4/24, 6:09 AM
by codr7 on 12/4/24, 11:02 AM
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.
by foretop_yardarm on 12/4/24, 1:58 PM
by indigo0086 on 12/4/24, 5:21 AM
by orliesaurus on 12/4/24, 2:09 AM
by conradfr on 12/3/24, 11:49 PM
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.
by ranuzz on 12/4/24, 8:49 AM
by zelphirkalt on 12/4/24, 3:21 PM
by slimebot80 on 12/4/24, 11:10 PM
I'm attracted to JS+Cloudflare because hosting seems predictable and reasonably priced.
Do people have good recommendations / experiences with hosting?
by miloandmilk on 12/5/24, 9:18 AM
by sails01 on 12/4/24, 4:17 AM
Any plan to support native iOS & Android? I will love to consider Liveview as an alternative to our Ionic+Capacitor setup
by lordofgibbons on 12/4/24, 6:07 AM
by k__ on 12/4/24, 2:35 PM
by bgdkbtv on 12/4/24, 12:02 AM
by nickgnd on 12/4/24, 9:32 AM
by arbaaz on 12/4/24, 10:09 AM
by ferfumarma on 12/3/24, 11:50 PM
by neycoda on 12/5/24, 11:01 PM