https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
k

Konstantin Petrukhnov

12/17/2019, 8:07 AM
@etolstoy @hhariri Some samples/snippets, that allow to add features implemented with MPP/KN to existing ios/android projects could help with adoptability of Kotlin to existing projects. E.g. there is 4 projects: kalina-ios, kalina-android, oka-ios, oka-android. None of them use Kotlin. They have HTTP/DB/whatever functionality inside them. Now we want to add one new feature to all of them. Implementing with Kotlin make sense, as we could implement 70% of new functionality in common code only, and whole module, may be implemented by 90% with kotlin. Lets assume that new functionality require to modify fields of 1.000.000 objects and show first 1000 of them in UI. New people coming to Kotlin need to understand: * How to structure, build and import library into existing projects? Existing Kotlin documentation don't answer that. Examples in internet are misleading. * Is it coroutines/workers/gdc/syncronize/etc that could be applied to run update operation in background (that may take 10+ seconds)? * Where should be code that handle multitreading: commonMain, kotlin ios/android, swift/java? * Where to put tests: common, ios/android? * How to make multiple kotlin libraries to play together? * What are the performance impacts of doing things in Kotlin? E.g. if there is need to update fields for 1.000.000, does all of them need to be copied (immutability)? Code snippets, diagrams, project samples, that address these questions will help people to learn expected way to work with Kotlin.
👍 3
k

Kris Wong

12/17/2019, 2:07 PM
I am writing medium articles on some of these. @kpgalligan also has some good posts on concurrency & Kotlin Native
given that it's all still experimental, it's understandable that JB isn't being too prescriptive. they're trying to leverage the community to understand what the best practices should be.
k

kpgalligan

12/17/2019, 3:42 PM
h

hhariri

12/18/2019, 8:39 PM
Thanks for this feedback. We’ll definitely look at it and see what we can do.
5 Views