I’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..
A good number of native apps are unusable without an internet connection.
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.
I don't want to use JavaScript for everything. I have to, because my team is only 6 people, and we're responsible for the entire stack. If I chose literally any other technology, I'd be the only one able to maintain it when things go wrong.
If it was a choice between JavaScript or Elixir, it would be Elixir every single time for me.
I 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.
My 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.
Yes, 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.
I think AirBnB is using Server-Driven UIs (SDUI) in its native apps. One may have at least one native screen just for fallback. Most of the apps are not offline-first anyway, in the best case they implement some speculative/optimistic UI with retries for cases when connection suddenly drops for short amount of time.
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.
Social networks, news sites, online marketplaces or retail.
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.
Are you assuming that it is going to be online only or is there an architecture doc that says that?
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.
> I’m having a super hard time understanding why you’d want a native app require 100% connectivity.
> 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
Would be interesting to see if the idea was to have the server + client native complete with local storage and then have the BEAM node connect elsewhere.
I think many of the business apps I use (banking, train tickets, shops...) are literally just webviews, and could benefit from this kind of system to make a much more native-feeling app at a low budget. A lot of these apps aren't particularly useful without an internet connection.
Really? I haven't used a native email client in awhile, but I seem to recall being able to peruse already downloaded emails, as well as drafting emails without needing connection.
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.
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 ??