11 ms·
Elixir – Phoenix LiveView Native
- vineyardmike 4y agoOne thing that isn’t clear - does the elixir runtime (OTP) run on the iOS device? It looks like a well integrated web view, but it’s not clear if it’s all running on device. Does apple support a web page not loaded from local?
- lefrenchy 4y agoIf it's anything like Phoenix, it's just websocket based on the client (iOS device in this case) which has a DOM diffing mechanism to patch in updates from the Elixir backend. Short answer: no the client side is not elixir I suspect.
- deleted 4y ago[deleted]
- olivermuty 4y agoThey jumped the gun a bit with the page, but what I have been able to piece together so far is that they renamed the WASM runtime from Lumen to FireFly and FireFly is what powers this through WASM. So OTP is running natively on the phone. This is essentially React Native reinvented with Elixir, which to me is pretty awesome because I really dislike React Native although we have done quite a few projects with it :) Edit: Totally mistaken, I stand corrected! Turns out I jumped the gun instead. Hopefully FireFly and this CAN give me the RN replacement I desire.
- ricketycricket 4y agoIt is not on the phone, no. I'm sure eventually you could run it on the phone like Elixir Desktop[1], but that isn't what it is at the moment. The phone connects to the server via a websocket and the SwiftUI "DOM" is pushed to the client just like HTML would be. In fact, I already built a hybrid Web & Native demo[2] that demonstrates that it's just bog-standard LiveView. [1] https://github.com/elixir-desktop/desktop https://github.com/elixir-desktop/desktop [2] https://natetodd.com/building-for-web-and-native-with-liveview-native/ https://natetodd.com/building-for-web-and-native-with-livevi...
- uxcolumbo 4y agoWhat do you dislike about RN? Some are using ClojureScript to write RN apps, like the folks at vouch.io … here is a talk by David Nolan https://youtu.be/3HxVMGaiZbc?t=1015 https://youtu.be/3HxVMGaiZbc?t=1015
- oomkiller 4y agoThere's no WASM involved and the BEAM is not running on the device. It works like LiveView, except instead of an HTML DOM you have a SwiftUI hierarchy. The client side of LiveView is a SwiftUI view itself, you can use many standard SwiftUI views, and also add your own custom ones for when you need something bespoke. It can be the whole app or just part of one.
- lawik 4y agoPeople have shipped the BEAM VM as part of iOS apps recently though. I think Thinking Elixir covered it in an episode.
- pawelduda 4y agoAny additional info? The linked website is just a teaser.
- atonse 4y agoIf this is like react native except where most of the logic is server-side (but sends down some kind of native DOM that gets rendered natively), I'm sold. This seems to be a more detailed link: https://dockyard.com/blog/2022/09/01/dockyard-r-d-build-elixir-web-native-apps-seamlessly-with-liveview-native https://dockyard.com/blog/2022/09/01/dockyard-r-d-build-elix...
- ricketycricket 4y agoYes, that is what it is.
- atonse 4y agoFor the last few months as we’ve been adopting liveview more. I’ve been researching what would be needed to build something like this in my spare time since we have much more elixir talent than react native. So glad you guys have been working on this. Very excited and looking forward to trying it out next week. We will likely adopt this and make a bet on it.
- nsriv 4y agoThis is a MUCH better link, thank you for sharing.
- yellowapple 4y agoThat should be the post link. The current link doesn't really explain anything at all.
- chrismorgan 4y agoEww, that page renders “post not found” (though with a 200 response), and then replaces it with the actual content via client-side scripting. The effrontery of the header text “It looks like you’re checking to see that we’re server-side rendering. We are!” is palpable.
- yewenjie 4y agoI sincerely hope this will be open source. Otherwise it'll just be another niche thing like various cool things in smaller languages.
- ch4s3 4y agoIt is open source https://github.com/liveviewnative https://github.com/liveviewnative
- freedomben 4y agoI don't see a repo on there for LiveView Native. Just a tutorial, example app, and a backend.
- bcardarella 4y agowe have clients per device. So there is a SwiftUI client and a Jetpack Compose client
- veg 4y agoHave led multiple teams on Elixir projects across a few companies. And while I still love the projects, the community just isn't there anymore. I hope this project sparks some renewed interest in Elixir! (That said, the linked site has basically zero information or examples)
- bmhin 4y agoElixir was one of the few languages I saw in companies (albeit, infrequently) that wasn't like Java, C#, Python, or JS (Scala here and there). Was always curious about it as perhaps something that could be reasonably pitched as having some nominal uptake. Pure anecdata there also. Literally just ones I have personally seen on clients or heard about from coworkers.
- ch4s3 4y agoWe use it at a large company and employ almost 60 people writing it. It’s been great so far. The talent pool is really good and it’s easy to teach to junior devs.
- ipnon 4y agoThe community seems stronger than ever. What was your experience of its fading away like? Projects like this don’t give the impression of a language falling by the wayside. People tend to fall in love with Elixir. You never forget falling in love.
- jononomo 4y agoSeems like the volume of posts on ElixirForum.com is way down over the last 12 months.
- lawik 4y agoI'm very active in Elixir but the forum just hasn't been my vibe.
- cultofmetatron 4y ago
- bsaul 4y agoI’m having a super hard time understanding why you’d want a native app require 100% connectivity. When the app feels like (or is) a web app, then at least the user understands intuitively that nothing is going to survive connection loss. However with a native feel, seeing the app freeze and navigation become disabled is going to feel completely wrong.. Did i miss something ??
- cercatrova 4y agoYes, this feels like the exact opposite of an offline-first approach that many tout as being useful for applications in general.
- capableweb 4y agoMy assumption was that you ship the server software together with the desktop software, maybe could even be one file. So running the binary runs the server + open the UI, shutting everything down when the UI closes. You can do something similar with Tauri in Rust, so you get a desktop application communicating via local http in just one binary.
- thruflo 4y agoYes, I’ve done this with LiveView and Tauri and it works. At the time, the barrier to my investigations was LiveView interop with component frameworks. Even Ionic Vue was tricky to get the re-rendering right. Having a native framework ontop of liveview unlocks shipping it for desktop apps. Bundle a local first database and you have a highly productive stack for building snappy, small bundle, native apps with web technologies.
- Existenceblinks 4y agoI guess that Phoenix LiveView is going to blow B2B apps up at some point. I'm thinking of ATM / smart vending machine / smart ads board. Yes, those that are 100% internet connected.
- andrewmutz 4y ago
- 71a54xd 4y agoAny example projects / code?
- chartpath 4y agoThere is a tutorial up https://liveviewnative.github.io/liveview-client-swiftui/tutorials/yourfirstapp/ https://liveviewnative.github.io/liveview-client-swiftui/tut...
- Aqua_Geek 4y agoThere’s the ElixirConf 2022 chat app: https://github.com/liveviewnative/elixirconf_chat https://github.com/liveviewnative/elixirconf_chat
- Mizza 4y agoCurious to take this for a spin. I've been wrapping LiveView apps in WebViews and they feel pretty good, but any improvement would be welcomed.
- nickjj 4y agoIs this what DHH and Rails did with Hotwire Turbo and their native iOS/Android libraries to allow you to use identical server rendered HTML content that you use for your web site in native mobile apps without needing to write native apps beyond a shell or whatever native controls you want to opt-into using? They've been doing this with Turbolinks for years (I think it was first mentioned in a 2016 Railsconf keynote), seems like a good pattern. I'm so happy DHH came up with this pattern, especially the idea of leaning heavily on HTTP (not Websockets) and sending HTML over the wire for fast page updates.
- bcardarella 4y agoI haven't done any Rails dev work in a while but as I understand it the Rails implementation is a Webview, not actual native UI
- deleted 4y ago[deleted]
- e3bc54b2 4y agoTangential, but where can I watch the talks from ElixirConf 2022? Youtube channel has not uploaded any yet, and the website doesn't seem to have any recordings either. All I see is 250$ to attend virtually. Shouldn't their target be to spread word fast and wide? I get paid tickets for in-person attendance, but online talks should ideally be live streamed for free, no?
- lawik 4y agoThe confs I've seen tend to release videos later. Virtual tickets probably make decent money and I think most confa want to clean up the long-lived video before putting it out. Low incentives to stream for free it seems.
- e3bc54b2 4y agoI've not been part of lot of conferences, but both Emacs conf and Nix conf put videos up pretty much as soon as they're presented. But if the conference is independent and the aim is to make money, I get it. Conferences with aim to socialise/promote to/the userbase tend to make it as low friction as possible.
- Scootwilli90 4y ago[flagged]
- thinkpad13 4y agojust this currently? no demo or something like that?
- theanirudh 4y agoThere is a sample app and tutorial here: https://github.com/liveviewnative https://github.com/liveviewnative
- samoit 4y agoIs this the same?: https://github.com/elixir-desktop/desktop https://github.com/elixir-desktop/desktop Looks quite similar to me.
- bcardarella 4y agoNo, Elixir Desktop is a great project as well. It packages up the BEAM entirely into a native binary. So Elixir/Erlang runs natively on the phone. LiveView Native will render actual native SwiftUI components into the SwiftUI viewtree. In other words, LVN is just a client whereas Elixir Desktop is the entire BEAM runtime/VM