DEV Community

Discussion on: Musings: What the tech world saw in Kotlin

Collapse
 
karan_shah89 profile image
Karan Shah • Edited

I saw your talk and I felt it was great!

But given that Google is now backing Flutter more than ever and now officially allowing developers to create Web and Desktop apps (Even Android Auto and Raspberry pi) - do you still think KMP is the way to go forward?

Also, how do you see the synergy of Flutter with KMP going ahead in the future?
Is it wise to use both in an app with Flutter looking at UI and Kotlin on the business logic?

Collapse
 
piannaf profile image
Justin Mancinelli

Thanks, glad you liked it. You'll remember from the talk I believe strongly in apps being "native to users" meaning it meets the user's expectations of the platform -- a Mac app looks/feels like a Mac app, an Android app looks/feels like an Android app, etc. Some examples:

  • Localize doesn't look/feel like a web app
  • Invoice Ninja doesn't look/feel like an iOS app
  • Drop doesn't look/feel like an Android app

Even with Google putting more marketing and engineering behind Flutter, I don't believe they will put enough effort into playing catchup with iOS guidelines and, in many cases, recreating native widgets is more effort than its worth (even for Google with a ton of cash to throw around).

At this point, I don't see much chance of a synergy between Flutter and KMP. It would be interesting to use Flutter as the UI layer for apps which shared UI makes sense and share business logic with KMP but Flutter's platform channels makes that seem like it won't be a nice experience.

do you think MP is still the way to go forward?

From the user side

For apps where a solid user experience taking into account platform differences in UI, sensors, OS-level integrations, and/or Google/Apple-provided services, KMP is the way to go. And I think that is most apps that reach a certain scale.

Games are a completely different story which I'm not very familiar with. But, at least sharing UI and not caring about platform guidelines are expected. There are many 2d game engines around and Flutter is probably not a better one.

From the business side

See above because a business should be customer-first.

If you have an existing app (or portfolio of apps), KMP is the lowest risk -- continue to use first class langauges Kotlin/Java and Swift/ObjC, continue to use first-class tools Android Studio and Xcode, continue to support existing apps (Flutter is still a pain to integrate with others), start sharing business logic immediately (SQLDelight, Ktor, etc), don't worry about Dart or Flutter changing or shutting down, don't worry about losing investments you've already made.

If you are starting from scratch, it may make sense to start with Flutter for rapid development/experimentation/prototyping then move to native apps via KMP for production. Similar to how many companies had diminishing returns to React Native and have since gone back to fully native (they should be using KMP 📢).

Also

Something else that worries me is Dart doesn't have any plans to support Wasm, and doesn't work well with existing web apps, either. It is a capital 'B' big decision on mobile and web, whereas KMP is a small decision that you can iterate on to be bigger as you see fit.