Remix.run Logo
vivzkestrel 4 days ago

Been out of android stuff for a while, can someone kindly elaborate here

- best way of making apps last i checked was swift for ios and java for android

- i read somewhere java got replaced with something called kotlin

- then i heard they added something called flutter that works on both android and ios

- react native / "web browser based" was already a form of dev i think which was considered the most non performant solution out there

Is this swift on android another layer like the above ones? the most performant layer is always native right?

satvikpendem 4 days ago | parent | next [-]

React Native is not webview based, it's basically a translation layer that takes your JSX markup and turns it into SwiftUI / Kotlin UI code, native on each device.

Personally I like Flutter, a lot of people, even hardcore Android native devs, say Flutter could be the way to go for Android development in general [0].

[0] https://old.reddit.com/r/androiddev/comments/1np26m4/do_othe...

palata 3 days ago | parent [-]

I liked Flutter 1.0, but then it broke my codebase with 2.0, and again with 3.0, which made me swear never to use it again.

The good ideas of Flutter, IMHO, got implemented in native Android (Kotlin + Compose).

satvikpendem 3 days ago | parent [-]

I don't mind not having backward compatibility especially when it's for a growing framework that's not feature complete. Those versions are semantically versioned so you didn't need to upgrade if you didn't feel like it.

Jetpack Compose and Compose Multiplatform is nowhere near what Flutter does, it's essentially still Android only as their other OS support isn't really stable, even if they say it is. I tried to make an app and gave up and went back to Flutter.

palata 3 days ago | parent [-]

> Those versions are semantically versioned so you didn't need to upgrade if you didn't feel like it.

This is only valid if you write a trivial app. If your dependencies migrate to the new major version, eventually you have to do it as well.

Cross-platform frameworks are generally not terrible for trivial apps; the pain comes when the app get complicated. But then if it's a trivial app, I can write it natively in the different languages I need to support, so there is not much need for a cross-platform framework.

Of course if your alternative is Qt, then Flutter is better :-).

palata 3 days ago | parent | prev [-]

> then i heard they added something called flutter that works on both android and ios

Flutter is just another cross-platform framework that happens to support Android. I think it brought good ideas that since got implemented in native Android. I am still against cross-platform frameworks anyway.

Kotlin-the-language has evolved into compiling for different targets instead of just the JVM. So with Kotlin MultiPlatform (KMP), you can compile your Kotlin code as a native executable (instead of a JVM one) or as an iOS framework. So that you can share a Kotlin library between e.g. Desktop, Android and iOS. The difference with Flutter is that KMP is not a cross-platform framework; just a way to "cross-compile" a library, if I can say. Just like you may share a C++/Rust library between iOS and Android, you can share a KMP library.

And Swift is also trying to get there, though it is less mature than Kotlin in that respect.

The advantage is that you can cherry-pick the library you want to depend on. Maybe your Swift team wrote advanced logic in Swift and it makes sense for you to call it from Kotlin instead of rewriting it, just like you may depend on a C, C++ or Rust library. And it is different from a framework like Flutter: if you go with Flutter, you write the whole app in Flutter.