Elm and Ionic? Yes/No/Suggestions?

Hi,

I’m about to start looking into possible solutions for building mobile apps with Elm.

I’ve read through some of the docs for Ionic, and was wondering of anyone has tried Ionic and Elm? (Or any of the other solutions available)

I’d love to hear about any experiences of building cross-platform mobile apps with Elm.

The project I’m looking to start will comprise of mobile apps, desktop apps (probably built with Tauri), and the companion website, so, as a lover of Elm, I want to use Elm for all three.

Thanks guys.

2 Likes

Elm won’t play particularly well with Ionic (a UI framework primarily for React and Vuejs) however Capacitor the underlying platform is just JS and you should be able to use Elm just fine alongside.

Having tried to build web based mobile apps on a bunch of platforms over the last 15 years, Capacitor has been the best experience I’ve had so far - but native app dev overall still remains way more painful than plain web dev.

3 Likes

Thanks for the info.

I’m fine with Swift for iOS so could go native there, but I’ve looked at native Android development a few years ago and found it really tough to get my head around - hence looking for a solution where I can use Elm and build to both iOS and Android.

I’ll look at some of the other solutions, including capacitor, and may look again at native Android.

Thanks again.

2 Likes

Out of curiosity, recently I saw a project about creating native apps in Elm, but it seems not released yet in any form. More info at Slack

If you want something closer to native, but still cross-platform and also like the elm architecture, you could try Fabulous - uses F# and follows the MVU (TEA) architecture.

God, I really need to write about this. I keep putting it off, because there’s a lot to cover.

But yes. Yes, you can do it, and you should do it. It’s beautiful.

I built an app last year with Elm and Ionic Capacitor and nothing else, and I would absolutely do it again. You can find the app at https://gatesnaplabs.com.

9 Likes

Was it this recent post?

1 Like

Yes, that is the post

@paulh if you’re fine with native iOS, then Capacitor will be especially nice for you as unlike previous/alternative incarnations of the web-platform-on-native concept – it specifically doesn’t try to abstract away the underlying native platform.

Native code is a first class citizen and there are examples of how to drop into it and write the interop back into Capacitor. Also Capacitor doesn’t try manage your iOS / Android projects for you in a “hide them from the user” way, which I think was the downfall of current and past alternatives like Cordova.

This means you can for example mix in native components, i.e. say the Intercom chat plugin, and interact with it from Capacitor JS code, giving a much more hybrid native feel to the app.

1 Like

Okay. I did it. I wrote a guide to creating Elm applications with Ionic Capacitor.

@ me if you have questions!

9 Likes

Elm native is public now

5 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.