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

vmichalak

07/27/2018, 5:17 PM
Another question: Is there a multi-platform UI framework project for kotlin ?
t

thevery

07/27/2018, 5:41 PM
Looks like no. You can take a look at Jake's sdksearch for Android+JS though I'm not sure there is something about UI.
It is possible to make wrappers for basic widgets like lable, button, etc, but for me it is unclear how to make complete framework.
k

krtko

07/27/2018, 6:01 PM
In general I'd suggest just writing native UI code for each platform, but theres nothing stopping someone from implementing a cross platform view system
m
t

thevery

07/27/2018, 6:11 PM
@krtko desktop ui system is quite possible for desktop ^, but that's not quite the case for mobile and js. React native is quite complicated and the power for kotlin native is probably in expect/actual anyway.
j

josephivie

07/27/2018, 6:53 PM
I'm currently working on one that uses the native views of the platform under the hood, allowing for uncommon views more easily (like maps). Still very much in progress. Android and Desktop have basic implementations. https://github.com/UnknownJoe796/kotlinx-ui
t

thevery

07/27/2018, 8:36 PM
@josephivie btw have you seen domic from Lyft?
j

josephivie

07/27/2018, 9:00 PM
@thevery Not until now. Looks a lot like what I've done so far.
t

thevery

07/27/2018, 9:02 PM
You can probably ask @artem_zin if you have some questions
a

artem_zin

07/27/2018, 9:27 PM
well, it looks like we're solving it a bit different tho
main focus of Domic — non-blocking, reactive apis only with in-memory testing and performance in mind (scales really well)
multiplatform is not really possible until we make multiplatform rx
a

agrosner

07/27/2018, 9:30 PM
Yes multiplatform rx would be ideal
a

artem_zin

07/27/2018, 9:30 PM
oh hai Andrew K
a

agrosner

07/27/2018, 9:31 PM
Kotlin way with extension methods and maybe making some common interfaces would make it much smaller than current rxjava bloat
Hey artem!
a

artem_zin

07/27/2018, 9:31 PM
well yea that's one way
j

josephivie

07/27/2018, 9:49 PM
RxJava isn't very Kotlin-ish IMO. Instead, I do events via
MutableCollection<(EventData)->Unit>
, observable properties via the same but also with the ability to retrieve the value immediately, and use lambda transformations instead of RxJava's manipulations. You can accomplish the same goals with those tools, as far as I can tell.
3 Views