logoalt Hacker News

vivzkestrelyesterday at 3:26 AM2 repliesview on HN

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?


Replies

satvikpendemyesterday at 4:25 AM

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

palatayesterday at 9:29 PM

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