https://kotlinlang.org logo
Title
m

Mike

05/29/2021, 1:08 PM
Does anyone have an opinion on the best desktop and web framework to use with mvi now that compose is out? I looked at kotlin/js and kotlin/webassembly as well. I am leaning towards trying out compose with mvi.
a

Arkadii Ivanov

05/29/2021, 4:58 PM
Are you asking for an advise about MVI framework? Or what do you mean by "desktop and web framework"?
m

Mike

05/29/2021, 11:31 PM
I’m looking to expand my app onto either the web or desktop (as long as it works on windows and mac), and looking into which framework to use. I saw that the mvi examples use kotlin/js but compose looks promising as well
a

Arkadii Ivanov

05/29/2021, 11:35 PM
Sorry, still not clear. Basically if you are asking about which MVI framework to use, and assuming you want to work with Kotlin Multiplatform, then MVIKotlin probably worth to consider.
It supports Kotlin/JS, but it does not support wasm32 yet.
Actually I never heard if anyone uses or considers wasm32. You are the first one 😧
m

Mike

05/30/2021, 12:45 AM
Yeah I’m planning to use MVIKotlin with either Kotlin/Js, Kotlin/Webassembly, or Kotlin/Compose, though starting to look into Compose and Webassembly. I think one benefit is the possible performance over Js (which is single threaded). Compose would run on desktop instead of web, but if it’s much easier than working with Kotlin/Js or Kotlin/Wasm i might go that route since it still gets me cross platform desktop usage of my app.
Oh I guess now there’s also compose for web… I will look into that
a

Arkadii Ivanov

05/30/2021, 8:43 AM
Yeah, Compose for Desktop is cool! I would prefer writing a desktop app instead of a browser app, if I had do choose. There are plenty of examples available: https://github.com/JetBrains/compose-jb/tree/master/examples
👍 1
The TodoApp example uses MVIKotlin btw: https://github.com/JetBrains/compose-jb/tree/master/examples/todoapp It also has Android and iOS native apps sharing the same code with the Desktop app
m

Mike

05/30/2021, 8:49 AM
Oh I didn’t notice! I will take a look. I was looking at the MVIKotlin repo
a

Arkadii Ivanov

05/30/2021, 8:50 AM
There is no desktop example in the MVIKotlin repo.
m

Mike

05/30/2021, 8:50 AM
Yeah I was looking at the Kotlin/js one for web
I’m still thinking whether to go the desktop route or web. It seems with desktop I’ll need some kind of update mechanism or publish through desktop app stores.
I already share lots of code between ios/android using mvikotlin so it’d be good to re-use that
a

Arkadii Ivanov

05/30/2021, 8:52 AM
I am not aware of any cases of a Kotlin web app which is distributed via app stores as a desktop app.