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

kpgalligan

09/27/2018, 6:43 PM
t

thevery

09/27/2018, 7:44 PM
For libraries we need more on DB/SQL, network libs like retrofit and production-ready coroutines and serialization.
Smaller libs like okio and timber are welcome as well
k

kpgalligan

09/27/2018, 7:46 PM
Can you expand on the db need? Example?
t

thevery

09/27/2018, 7:46 PM
For tooling my vote for testing (mock/assert)
@kpgalligan kv/nosql and sqlite driver/mapper as well (I know about your work on knarch and sqldelight is getting multiplatfrom as well)
k

kpgalligan

09/27/2018, 7:53 PM
Any specific nosql library you use currently? Not super versed on that side of mobile db. Also, different features of sqlite driver? That's kind of what knarch is intended to be (sqlite driver), although now that K/N releases are becoming more stable there's a long refactor list
o

orangy

09/27/2018, 8:04 PM
I think you can look at “top ios/android libs” lists and come to some conclusions, like this: https://www.raywenderlich.com/259-top-10-libraries-for-ios-developers
t

thevery

09/27/2018, 8:12 PM
@kpgalligan probably most used is https://realm.io/products/realm-database, but I have not experience with is
But the most challenging is some UI framework for iOS/Android.
k

kpgalligan

09/27/2018, 8:53 PM
UI. That'll definitely be challenging. I've been thinking about that quite a bit recently. Big topic, lot of dimensions. UI generation, more of a UI testable "contract" that needs to be generated in a platform specific way, componentized (React/Flutter), code change/reload time, big team, small team, etc.
Realm. Would be interesting to see their current situation. The devrel budget seems to have contracted, and I haven't heard much WRT conference submissions for Droidcon. Wondering what's actually happening out in the field. I had a version working with J2objc at one point, but their java does bytecode manipulation, which didn't work out with J2objc. The core is C++, though, which would be pretty portable, but I digress.
Side note, SqlCipher would be pretty straightforward (not easy, per say, but no existential issues AFAIK).
t

thevery

09/27/2018, 9:32 PM
For UI we can probably use react native-like approach (actually there are not too much alternatives) with wrapping views, but some work on bootstrapping common UI controller (activity/fragment and uiviewcontroller) must be done first.
Actually there is Anko layout for Android that is already able to inflate layouts from DSL but I'm not 100% sure that loosing xml layouts (and tooling!) is a good thing.
(BTW UI discussion probably with separate thread)
k

kpgalligan

09/27/2018, 9:34 PM
Yeah. Agree. Also, I was writing a big reply, but I think I'll restart that later. I'm very good at procrastinating when I should be actually working on this talk.
👌 2
o

orangy

09/27/2018, 9:37 PM
Come back after 3 more slides 😉
😃 3
r

russhwolf

09/27/2018, 9:40 PM
I’d second mocking. A cross-platform mockito replacement would be great for common-module unit tests
o

orangy

09/27/2018, 9:45 PM
I’m afraid multiplatform mocking framework would need a compiler extension to manipulate code generation. And this is not coming very soon…
k

kpgalligan

09/27/2018, 10:39 PM
You think "not coming very soon" is like not this year, not next year, or not really on the roadmap? I know that kind of stuff is hard to say, but curious
o

orangy

09/27/2018, 11:23 PM
I can only say it is on the radar, but doesn’t have specific slot in the plan.
👍 3
r

ralf

09/28/2018, 12:23 AM
I appreciate that you give some hints about your plans and what is important to the Kotlin team. That’s really helpful for devs relying on Kotlin
👍 1
g

gildor

09/28/2018, 3:17 AM
A cross-platform mockito replacement
#mockk is on the best position there, Even K/N support under development https://github.com/mockk/mockk/issues/58
k

kpgalligan

09/28/2018, 3:11 PM
I've been poking around that issue. The solution was worked on around K/N 0.6.2, so I think it would make sense to have a refresh on that. Same approach? That kind of thing.
l

louiscad

09/28/2018, 6:47 PM
Multi-threaded coroutines are what is missing for me. I now write UI contracts with
suspend
functions, and it could be platform agnostic, but I can't use it from Kotlin/Native for now
k

kpgalligan

09/28/2018, 6:49 PM
Yeah, on my list that's the biggest one. I mention it multiple times in the talk 🙂
l

louiscad

09/28/2018, 7:48 PM
After this is done, I'll spend time learning iOS APIs and Kotlin/Native seriously, then try to make BleGattCoroutines and CameraCoroutines multiplatform among other things
r

russhwolf

09/28/2018, 8:21 PM
Another place to look for potential new libs is third party frameworks. Something like Firebase comes to mind, or any of the myriad analytics frameworks. There’s lots of things that have Android and iOS libraries that probably expose pretty similar APIs and could be wrapped in expect/actual without too much work. Obviously down the road most third-party dependencies will publish this themselves if Kotlin Multiplatform gets popular, but that doesn’t help you if you want to use something today.
1
l

louiscad

09/29/2018, 4:14 AM
Yes, I thought about Firebase the other day, but again, this needs multi-threaded Coroutines to work (see recent Android Firebase Task API module in kotlinx.coroutines that shows how much the APIs are coroutines friendly)
Something that will be missing: efficient multiplatform l10n support
g

gildor

10/01/2018, 7:52 AM
Actually localisation is interesting problem. Looks that you need own multiplatform implementation of localisation. otherwise you should duplicate strings or generate them for each platform on compile time
2 Views