GenericJam

GenericJam

Interest in Elixir Mobile Framework?

Is there any interest in a mobile framework for Elixir akin to React Native or Flutter?

I am really interested but not sure about the right approach. I’ve done the steps here (this post is 5 years old so they have to be adapted a bit) to get Erlang working on an Android device although it’s currently only working through adb shell as the phone isn’t rooted which is the only way I can see I could run it with Termux. Not sure what the next step would be to get Elixir running on top of that but that’s the plan.

Maybe for graphics, etc we could look at Scenic.

I also thought about dissecting the build systems of Flutter or React Native to see if we could use a similar approach.

In the end I would like to have a component based systems similar to RN and Flutter. It makes sense to use something like Phoenix Templates for this.

I think Elixir as a language makes a lot of sense for mobile given its superior take on concurrency.

If I dare to dream I think we could think about things like code push in the future as well.

Does anyone have experience with getting beyond just building Erlang for mobile? I’d be interested to know what worked.

Most Liked

boydm

boydm

Creator of Scenic

Hey there.

It isn’t that Scenic is only aimed a fixed size devices… Is more that it doesn’t have a built-in auto layout engine.

You can query the size of the screen when your scene starts. You can also dynamically change the scale factors and other things. It’s just that there are all sorts of compromises and tuning you would want in order to get your UI to look good under a variety of aspect ratios. Any attempt to build a generic auto-layout tool is both difficult and would need to make a set of decisions that didn’t feel like they would be optimal for all cases.

Having said that, you could make an auto-layout engine, and in fact, people are working on just that.

So… If you are looking Scenic on phones where you are effectively running a single app on a variety of screen aspect ratios, you need to think through how to reposition things to keep it looking good. Or just have a lookup table that that picks on of serveral nice pre-made layouts.

Dusty

Dusty

I think @boydm has commented in the past that Scenic is only aimed at devices with known/fixed screen dimensions. Given the variety of mobile devices you’d be targeting, that could be a major issue, but perhaps Boyd can clarify.

Given the amount of low-level work that goes into making these cross-platform mobile frameworks successful (and maintaining compatibility with the moving targets), I think you might be most successful if you piggyback on existing efforts. For example, writing an Elixir to Dart transpiler and supplying libraries that make the relationship to Flutter conventions transparent.

I am enthusiastic about the option to write any type of native code in Elixir, but I also see a trend in the other direction. People are weary of being chained to app stores, so there is more motivation than ever before to improve PWAs, the mobile web, etc.

eahanson

eahanson

You could look at the approach that RubyMotion took. It’s a complete Ruby implementation on top of iOS and Android and compiles down to native code. You can use all the iOS or Android SDK and third-party libraries (depending on which platform your app is running on) plus all the Ruby standard library functions that were ported over, plus any cross-platform RubyMotion-specific third-party gems. I’ve written iOS apps in Objective-C, Android apps in Java, and iOS+Android apps in RubyMotion and I definitely prefer RubyMotion.

If you have a lot of time, you could try doing the same with Elixir :slight_smile:

Last Post!

GenericJam

GenericJam

For anyone coming here in the future the best bet is to use Elixir Desktop for mobile.

Where Next?

Popular in Discussions Top

PragTob
Hey everyone, this has been on my mind for some time and I’d love your input on it! TLDR: I feel like maps are superioer for storing and...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54996 245
New
ben-pr-p
In general I’ve been sticking to this community style guide GitHub - christopheradams/elixir_style_guide: A community driven style guide ...
New
acrolink
How does the two languages compare when it comes to server side application development? Any experiences or ideas? Thank you.
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
cvkmohan
The upcoming Phoenix 1.6 release looks very interesting. Became a habit to watch the commits - and - what they are bringing in. phx.gen...
New
arcanemachine
https://nitter.net/josevalim/status/1744395345872683471 https://twitter.com/josevalim/status/1744395345872683471
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 130579 1222
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement