artem

artem

I am relatively new to Elixir (creating my first hobby app and learning on the go) and I wonder about where Elixir and particularly LiveView fit well.

Costs of supporting several platforms
A large share of startups that I see are fully or mostly mobile app based (think early Uber, Yelp or even AirBnB if it was started today). It involves having somebody to work on the backend, iOS, Android, web frontend (if there’s website) + somebody to design protocols/API, control their compatibility and at least half of a project manager to coordinate. Some people merge iOS/Android efforts via ReactNative or web tech running on the phone, but the amount of native nuances (e.g. trying to debug Android-specific layout troubles) is usually high and it’s rare that you save much while extra complexity is added.

Some teams just wrap web sites into app with tech like Cordova or Capacitor and then you just develop a single web site, but in order to make it look fast you still need to have a Single Page App that forces you to create and maintain a proper API.

LiveView opportunity
Now meet LiveView: an automagically fast web app that could be wrapped into a mobile app, no API to maintain, instant upgradeability (as it’s run on server side) and just one developer to create it all in a single language. Okay, plus somebody to help with the design, but such a person is needed for any option anyway.

It might be not exactly an ideal long-term solution as latency will exist, web pages will never feel 100% native, offline work is not really possible, using native functionalities (camera, gps, file upload, contacts, etc) might be tricky, but for many-many apps that don’t work offline anyway and are still searching most for product-market fit it seems like a killer option: just one developer to do it all, no caring of APIs + you get BEAMs reliability and scaling for free with one cheap(ish) machine possibly supporting many thousands of simultaneous users.

Is it actually happening?
Have you heard of Elixir/LiveView working well for mobile startups? Or have you considered it and rejected the idea?

Am I missing something?

  • Maybe creating a decent UI with native-like navigation is tough specifically in LiveView? E.g. maybe the way LiveView patches web page DOM is poorly compatible with mobile web frameworks such as Ionic and it’s super hard to implement typical mobile app view stacks (sliding in from the right)?
  • Maybe integrating with mobile capabilities via Cordova/Capacitor wrappers is hard and apps can’t really use camera, gps react to push messages easily?
  • Or is it about founders not willing to do even significantly cheaper-faster prototypes in the technologies they are unlikely to continue using if prototype succeeds?
  • Or maybe it’s all about the talent pool and elixir people just happen to be more backend-minded, telecom-banking oriented and don’t meet startup people much?

Showing Posts 1 to 8

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

I think there at least 2 things here:

  1. LiveView is still very new, and has had a pretty high rate of churn over the last year in terms of major changes to how it works and how you use it.
  2. LiveView is fundamentally unable to do an “offline” mode for apps. If you’re a mobile startup it’s pretty likely that this is a deal breaker. If you’re a web startup and you want to have a good mobile experience, probably you can just have a good mobile website and don’t need to do an app.
Exadra37

Exadra37

I will not go that far. Its important for some, but not for the majority. How many apps do you have installed on your phone that support offline mode?


Yes, the new LiveView Native :slight_smile:

https://liveviewnative.github.io/liveview-client-swiftui/tutorials/yourfirstapp/

https://github.com/liveviewnative

cjbottaro

cjbottaro

I honestly don’t understand the “offline mode” argument.

Internet connectivity is getting better as time goes on, not worse.

Admittedly this is anecdotal evidence, but my most used applications are:

  • Uber Eats (I am fatty)
  • Apollo (Reddit client, I am nerd)
  • Slack
  • Discord
  • Airbnb

I have zero expectation for any of those to work well with spotty internet connectivity.

shahryarjb

shahryarjb

What about PWA? Like NextJS ?

Exadra37

Exadra37

PWA works with any programming language and framework, therefore you can do it with Phoenix, and to start you just need to add to the root of the site the manifest file:

Example for https://apibaas.io:

{
    "name": "API BaaS",
    "short_name": "API BaaS",
    "icons": [
        {
            "src": "/favicon/android-chrome-192x192.png",
            "sizes": "192x192",
            "type": "image/png"
        },
        {
            "src": "/favicon/android-chrome-384x384.png",
            "sizes": "384x384",
            "type": "image/png"
        }
    ],
    "theme_color": "#ffffff",
    "background_color": "#ffffff",
    "display": "standalone"
}

If you go to the website on your phone you can then add the website to your home screen and when you tap to open it it will look like a mobile app on your device, but will not have all the native feeling.

Learn more about the manifest file:

Learn more about PWAs:

artem

artem OP

Well, LiveView Native is super-fresh to rely on yet (and probably will stumble into all the challenges ReactNative got into where you try to really work with native controls-code). Traditional LiveView is just web, so almost guaranteed to work within known limitations, and it is already here.

I didn’t think that maybe LiveView is just too young, so can’t be popular in all the niches just yet.

Exadra37

Exadra37

You need to watch the talk to understand their choices. They will work with native components for each target, not a virtual DOM that they then try to translate to each native platform.

dub2

dub2

No offline support.

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 91898 914
New
AstonJ
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4616 55835 594
New
byu
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project. My initial shotgu...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
matt-savvy
Is there a word for the ~> symbol used in Version strings? Do you also just call it a Squiggle Arrow™ ?!
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews