dwyl / learn-elixir

:droplet: Learn the Elixir programming language to build functional, fast, scalable and maintainable web applications!
1.6k stars 107 forks source link

LiveView Native #177

Open nelsonic opened 1 year ago

nelsonic commented 1 year ago

ElixirConf 2022 - Brian Cardarella - What is LiveView Native? https://youtu.be/dnDGh_Jmw-s

image

This looks promising. 🤞

nelsonic commented 1 year ago

WatchOS and MacOS are apparently possible with SwiftUI 😮

image
nelsonic commented 1 year ago

https://native.live/ https://github.com/liveviewnative/ios-tutorial

nelsonic commented 1 year ago

Roadmap:

image
ndrean commented 1 year ago

Seems like 80% of the front code is still Native to me, isn't it? I didn't really understand with they didn't target Reactive Native: plenty of people use it, it does the job, in JS, for both major platforms, and you can transform a HTML string into React elements.

nelsonic commented 1 year ago

@ndrean the reason for not targeting RN is simple: it's sloooooow. 🐌

For simple Apps where responsiveness (App booting/loading time) is not a priority, RN is perfectly fine.

We recently worked on an (massive + existing) RN App for a large fintech client, it had over 500+ distinct screens ... (don't ask ... 🙄) and everything about the Developer Experience was inferior to writing Swift ("real" Native) code. Debugging is still painful and app reloading is still clunky in 2022! Don't even get me started on the dependencies in RN! 😢 The time to setup a new dev machine was almost an hour. ⏳

We know the appeal of RN very well: write JS code and get a "Native" App ... 💭 This is the theory and it mostly works ... But for any App that grows to do anything other than basic "CRUD" it gets painfully slow. We're talking several seconds for a "cold start" of the App on the latest iPhones! ⏳ like go grab a coffee while the app boots ... ☕ I could go on about the RN DevEx (for bigger apps and larger teams) at length ... 🙊

Why handicap LiveView Native by targeting RN? Because it has more packages? YAGNI!

SwiftUI is made by Apple: https://developer.apple.com/xcode/swiftui/ image

In other words it's the best UX/DevEx you can get on iOS/Mac/iPad and WatchOS! 🚀

Yes, there might (superficially) be fewer components/packages in SwiftUI than RN, but that's a massive red herring argument. Focus on what really matters to the people using your App; the UX/performance! Building with SwiftUI is a no-brainer. Consider the happiness of the Dev/Engineer building the app SwiftUI, it's even more of a no-brainer!

There is zero compromise with this approach. We could not be more delighted that Brian & Co took it! ❤️

If they can pull off the Android with Jetpack https://developer.android.com/jetpack image

Then "full stack" Elixir could become a real thing! 😍 🤞 It remains to be seen how easy it will be to debug ... 💭 But we are very optimistic. 🙏

ndrean commented 1 year ago

Yes, probably RN is slow, even Flutter is slow compared to real native. I have only one experience with a very small app. My concern is that Elxiir/Liveview seems to contribute to only say 10% of the code base so you still need to be an IOS-Swift or Android-Compose expert to develop something. I plan to learn Swift to make a small mobile app (a hobby): I like kitesurfing, especially downwinds, but I struggle to find people to organize it (the problem with cars). I want to make a simple app where you declare an even: "when", "from where" and "to where" you would like to do your downwind, and let people join the list. Extra tools would be notifications and sending mails. You can see the events whether as a list or on a map with two markers and a line. Just 3 screens, login, list, and map and a few modals. I started to do this as a web app but I want to go mobile. That is the reason I tried to integrate an SPA into a Phoenix app. Looking forward to this because Elixir is a real delight to code. et's see!