Hacker News new | past | comments | ask | show | jobs | submit login

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..

Did i miss something ??




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.


Interesting perspective that resonates with me. What do you think of firebase + flutter with regards to single dev empowerment and entry barriers?


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.


What do you mean when you say "blow up"?


Not OP, but I interpret it as "dominate; take over; disrupt", ie a pretty hearty endorsement.


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.


Let me check which native apps I'm using most.

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.


Yes, this feels like the exact opposite of an offline-first approach that many tout as being useful for applications in general.


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.


Interesting. Do you remember which apps are doing that?


They talked about it on one of the podcasts [0].

[0] - https://podcast.thinkingelixir.com/98


47 minutes, no time for that. Luckily they link plenty of resources. It seems that the technology is https://github.com/elixir-desktop/runtimes


> 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.


Don’t forget about Lumen (now called Firefly) — compile and run OTP on WASM.


What is lumen or firefly? I can't get to any website or github. Can you share a link?

Got a github link https://github.com/lumen/ but it seems abandoned and not actively maintained



Erlang and Elixir -> web assembly I belive.


Exactly that. Compiles down to it rather than shipping the full compiled BEAM and runtimes.

Firefly is the new name, Lumen the old. Lumen lost momentum for a bit, DockYard seems recommitted to finishing it up.

I think it has fantastic promise.

Source: was helping publish news back when


Try switching off the internet of your phone and report how many apps are still working after that, there's actually very few of them.


Just checked my phone:

- 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


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.

It reminds me of so-called "hybrid" apps: https://signalvnoise.com/posts/3743-hybrid-sweet-spot-native...


I can’t do much with my native email app without connectivity.


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.


You're right; the iOS Mail app works this way.


you can run the phoenix app locally, i guess?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: