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 ??
We just accept that our fragmented software landscape spans several backend technology stacks, web browsers and two dominant mobile platforms that are in constant flux. ES6, Typescript, Swift and Kotlin didn't even exist a decade ago and their constantly shifting ecosystems are nearly impossible for a single developer to keep up with. Higher barriers to entry work well for the large companies that dominate our industry so they continue to churn out complexity as best practice.
Allowing a single developer to deliver customer-facing applications without the context switch and coordination overhead of a team is a big deal. In the 80s and 90s, this was possible. Today, even deployment has become a specialised role. Not every engineer wants to be forced into a backend or frontend role in an agile team with product owners and ceremonies. There needs to be room for the craftsman in our industry. This is a step towards empowering the individual hacker again.
Liveview Native is not hugely compelling if you're only looking at it from the perspective of an established company or funded startup that can afford a team of more than 3-6 engineers and devops. As a solo dev or bootstrapped startup with limited resources, this is a killer feature for elixir and phoenix.
If it was a choice between JavaScript or Elixir, it would be Elixir every single time for me.
You can do something similar with Tauri in Rust, so you get a desktop application communicating via local http in just one binary.
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.
I'd say only tiny number of mobile apps support true offline operation, e.g. supporting following buzzwords:
Offline-first
Occasionally-connected systems
Infrequently-connected systems
Partial connectivity
Intermittent connectivity
Packaging a webserver together with an app is also an old idea, though clearly hackish, it's probably better fit for embedded devices/IoT and desktop apps, much less for mobile.I would imagine the experience to not be any different from trying to use the Twitter app when you lose connectivity. The app can choose to either: 1. Degrade the experience gracefully. Still function in a limited way. 2. Display a network error message, pausing whatever action the user was about to take. Keep retrying for a bit.
PWA can get you almost there. But LiveView is server rendered (business logic lives on the server). A loss of internet would render such an app unusable.
With this technology, I believe they are bundling the Phoenix LiveView server in the binary - to alleviate that gap. It’s like packaging node + app in a binary.
I think, the appeal here is LiveView. You can develop a SPA/OPA native app without writing any JavaScript. The code is entirely Elixir + HTML + CSS. Bundle it with SQLite and you’ve got a decent stack now that can even work offline.
Disclaimer: I didn’t see many details on the project page. My assumptions may be incorrect.
Banking apps, all online
OSMAnd, offline
Cool Reader, offline
Some go (game) apps, one online, the others offline
K9, mostly online
NewPipe and YouTube, online
Maps, online
Gallery, Camera, Calculator, Notes, File Manager, offline.
So there is a space for about half of what I use to be built with Phoenix Native and probably I'm using less online apps than most people.
There are already examples where iOS app has embedded Phoenix server to which the webview client talks to locally on the phone. The local server can then sync with a cloud server however it wishes.
> Did i miss something ??
Yes. The article writers gave their reasons for why they are offering a native implementation of phoenix liveview.
* Build complex, client-side applications that are faster and lighter than
those built with heavy JavaScript frameworks
* Deliver better user experiences across all platforms (no more "uncanny
valley" effect)
* Optimize productivity and resources with a single team, managing a single
code base across the web and native- audible, work: I can access all previously downloaded books
- bitwarde and andotp: work
- sms, telegram and signal, work: I can access the full history
- countdown, alarm clock, click counter, work
- dynalist, work
- pi music player and vlc, work
- maps.me, organic map and osmand: work, as the maps are downloaded in advance
- firefox & chrome, work: I can access all the app menus and open html files
- podverse, spotify and netflix, work: everything I pre-downloaded is accessible
- twitter app, work. I can see all tweets previously seen and posted today
- pcloud and dropbox, work
- rbnb, work: my history is accessible
- K9 and yandex mail, work: I can access to all my imap inboxes
- oura ring, work: I can access my stats and history
- calendar, calculator, qt scanner, work
- gallery, explorer, home menu, settings: work
What doesn't on my phone:
- gmail, waze
- banks and cryptocoins appp
- stremio, youtube, and discord
It reminds me of so-called "hybrid" apps: https://signalvnoise.com/posts/3743-hybrid-sweet-spot-native...
Then, when you reconnect, you get new emails that you missed while you were out, as well as the ability to send the emails you'd drafted while offline.
Those are some pretty handy features to just throw away.
I hope this project sparks some renewed interest in Elixir!
(That said, the linked site has basically zero information or examples)
Elixir's culture is engineering-ish. So you will see decent libs that deal with weird mechanism stuff, but lack of vibe and forces driven from business needs.
Its the reason I tell startups to use laravel or node instead even though I built my startup in elixir. Yes its a huge advantage for what we do (realtime synced apps for managing restaurants) but its overkill for most saas products that are just glorified crud apps. laravel is a huge winner there with its library of prebuilt apps that handle user authentication, billing, tenancy as drop in components.
Pure anecdata there also. Literally just ones I have personally seen on clients or heard about from coworkers.
What gave you that impression?
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?
Short answer: no the client side is not elixir I suspect.
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.
[1] https://github.com/elixir-desktop/desktop
[2] https://natetodd.com/building-for-web-and-native-with-livevi...
Some are using ClojureScript to write RN apps, like the folks at vouch.io … here is a talk by David Nolan
This seems to be a more detailed link: https://dockyard.com/blog/2022/09/01/dockyard-r-d-build-elix...
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.
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?
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.
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.
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.