3 ms·
I really don't get the appeal of "multiplatform" rediscoveries. We already have the Multiplatform stack that is mature and truly Multiplatform: HTML+JS+CSS If
by mrtksn 3y ago
I really don't get the appeal of "multiplatform" rediscoveries. We already have the Multiplatform stack that is mature and truly Multiplatform: HTML+JS+CSS
If you need something close to the metal, you have C and others that are multiplatform.
If you want to do something slightly platform specific you loose the multiplatform claim instantly anyway.
IMHO, if you are going to do something that is not an UI to an API or a database, just do it in the native toolset for the platform so you can do it properly. Otherwise, just do a web app.
Apple's iOS API&Frameworks is quite extensive, if you are not doing just an UI then you will likely need to learn that. And for the UI? If your app is going to match the iOS conventions, do it in SwiftUI or UIKit as Apple will handle most of the stuff for you. It's probably the same for Android, no?
- brabel 3y agoWith KMP is that you can write all your logic in one language, then reuse that in all platforms, including iOS, Android and Web. That's quite valuable if it works well. I've been trying just that at work with mixed results... The lack of a multiplatform stdlib for pure Kotlin is very tough if you need to do a lot of crypto, various serialization formats etc. so you end up writing lots of multiplatform APIs that are implemented in the respective platform, losing most of the point of using KMP. I wouldn't want to write the UI also in KMP, though you could do even that if you don't mind using beta software (see https://www.jetbrains.com/lp/compose-multiplatform/ https://www.jetbrains.com/lp/compose-multiplatform/). Using Flutter makes much more sense in that case as nowadays it's very mature, has a huge library and excellent developer UX.
- your_challenger 3y agoYeah, the library ecosystem for KMM is lacking. Also the build system used to be a headache. I haven't tried KMM recently but it was so unintuitive a year back
- jillesvangurp 3y agoIt actually improved a lot. There are a lot of pretty decent multiplatform libraries out there. I've developed a few myself. It's pretty easy and straightforward. You are right that the tools were a bit rough a year ago. But they worked. I've been developing kotlin-js and multiplatform stuff since 2020. Definitely very cutting edge back then and not for the faint hearted. But our bet worked out and we now have a nice thriving business and a maintainable code base. In fairness, KMM and KMP are still in beta and the compiler has been in the process of being overhauled. That's a process that is nearly completed but it is still ongoing. Having used the new k2 compiler with kotlin-js, it's a big upgrade in terms of performance. I expect a lot of stuff to start stabilizing post Kotlin 2.0, which should be out in later winter/spring next year. 1.9.10 is the current release. 1.9.20betas are already out. There might be a .30 but the release after that is basically 2.0. 3-6 months out basically if Jetbrains sticks to their normal release schedule. IOS support in Compose Multiplatform is alpha quality. You shouldn't use it for anything important. But when it is done, you can expect to be able to develop applications with one code base that run nicely on Android, IOS, the web, or on desktops. Compose web is actually targeting the new wasm compiler. Which of course is also alpha. That's an interesting one because it uses the WASM standardize GC facilities. That's currently out in browsers already but hidden behind feature flags. Which are very likely to come off soonish. Give it a year or two. Too early to write it off now when it is basically all early access and alpha/beta quality. IMHO, there is some good tech coming together there.
- robertlagrant 3y agoJust being able to make client code for an HTTP API that can be installed into Javascript, Android, and iOS projects with identical logic is a pretty big win.
- mike_hearn 3y agoIn KMM multiplatform means Kotlin code can directly interoperate with Swift on iOS or Java on Android. HTML cannot do these things.
- Alifatisk 3y ago> We already have the Multiplatform stack that is mature and truly Multiplatform: HTML+JS+CSS And that translates to Electron on the desktop environment and a webview on mobile devices I guess? How is that better than Flutter for example? With Flutter, I am able to write once and compile to all platforms.
- jillesvangurp 3y agoIt's only hard to understand if you regard html, js, and css as good enough. It's the reason why people prefer native development on mobile. Standards are a bit different there than on the web and the space is more competitive. Kotlin multiplatform and compose multiplatform are about leveling the playing field a bit and giving developers more choices than this one size fits all straight jacket that is the "modern" web (I use the word modern loosely here). And it allows people targeting mobile to target other platforms with their code bases. If it's valid to use the web on mobile, then why not use mobile frameworks on the web?