I’ve published an article, which compares Kotlin M...
# feed
I’ve published an article, which compares Kotlin Multiplatform to cross-platform frameworks and gives some ideas on where and how use each of them: https://medium.com/xorum-io/cross-platform-mobile-apps-development-in-2021-xamarin[…]1f5a3e0?source=friends_link&sk=b2aea50e9ea1ea0c128a4bb7a1d0880a I would love to get some feedback 😇
I wouldn't say KMP is zero effort. Have you worked in any of these multiplatform frameworks? I've been on a xamarin project and you missed xamarin.forms which is good for corporate apps. React native also doesn't really compile down to native apps.
Yes, worked with Xamarin a few years ago 🙂 For React Native, I don’t have much hands-on experience indeed.
But for KMP, on Android it was zero effort for me, because we already used Clean Architecture (or Redux in other projects), and extracting common part in separate module felt very natural. So I almost didn’t notice it.
On iOS, it’s not zero effort, of course, but I didn’t claim that either.
I know all articles comparing different technologies are prone to have at least a little bias, since it will be very hard for the person writting it sepatare from personal opinion & experience. Also, I am not saying that all articles
be impartial. But exercising some distancing could help their relevance, should their goal not be, as you mentioned, marketing for a certain contender. I myself am too partial to kotlin, but as a fellow kotlin developer experimenting with several multiplatform technologies in a real production environment, I would contribute with 3 more cents: 1. It's usually not an
this OR that
choice. Often these technology is added on a brownfield project (which complicates integration and dev experience for ALL listed options). Also, it IS possible to combine, say, KMP for business logic and Flutter or RN for UI. It sounds unecessary complicated at first, but all depends on your team's size and backgrounds. 2. Learning 3 languages is, again, depending on your team's size and backgrounds. on a medium team is already possible to compartimentalize responsibilities, and learning all languages may be required only for team leaders 3. KMP is still pretty much alpha, an a lot of its tooling and integrations are still behind the other contenders. I strongly believe this is changing rapidly, but the timming might still be off for some companies
Anyway, not diminishing the merit of the article at all, it was all around very concise but informative, grats on that! Just wanted to offer some other points to the discussion
That's a good point, cross platform almost always involves tradeoffs. KMP currently is a pretty crappy experience for iOS developers... We've been looking at doing shared libraries in KMP. The current iOS memory model and coroutine threading is not something I'd put our iOS devs through because I don't want them to hate me 😂 We also looked at cross platform Swift which is actually further ahead than KMP in threading support... There was another team building libraries in this already and using it in one of our apps.
"We also looked at cross platform Swift which is actually further ahead than KMP in threading support..." This is wildly mischaracterizing the situation, in my opinion. Yes, the memory model takes some learning, but everything else about Swift for Android is going to be a nightmare, unless there's a large community actively moving this forward that I'm not aware of. I can't imagine not putting iOS devs through the experience of KMP, but forcing Android devs to talk to a huge swift binary over JNI? Not remotely comparable.
@Guilherme Cordeiro I was fortunate enough to not see any 2 cross-platforms in the same project, but yes I didn’t work in companies with more than 200+ employees. I’ve tried to remove my Kotlin bias, but of course it’s not completely possible. Well, at first, my bias was 100% native Kotlin Android apps, than I accepted Swift in iOS apps, now it’s KMP. Maybe one day I’ll like Flutter and React Native, but doubt it 🙂 Alpha is alpha, of course. But I don’t think that Flutter or React Native is safer bet in the long run 🤔
@kenkyee do you mean https://www.scade.io/ or something else?
That with our own layer... This evaluation was done last year as well but the main determinant was bad multithreading on KMP. Honestly don't think either is ideal currently 🤷‍♂️
Yeah, but my point is saying "neither is ideal", Swift for Android is a dumpster fire by comparison, and won't likely be improving much.
To be clear, I'm not a fan of it either 🙂
But this does illustrate that there will be pushback from one team is that side of cross platform is painful...
And with next year's, KMP memory model change, I think it'll be a lot more palatable on iOS...
My point is that Kotlin for iOS is way, way better than Swift for Android, for a huge number of reasons. To say "neither is ideal" implies that they're remotely comparable, and they're not. The multithreading, while different, and certainly not loved by all, works. Maybe not ideal, but doing a side by side comparison of KMP and Swift for Android would be a blowout.
👍 4
the only downside from my point of view for KMP except alpha status is KMP memory model that requires additional learning time