7 ms·
jeez so many ways to do things - react native flutter ionic and now swift. it seems dart + flutter still is the only way to do all targets (cli/web/iOS/andro
by websiteapi 9mo ago
jeez so many ways to do things -
react native
flutter
ionic
and now swift.
it seems dart + flutter still is the only way to do all targets (cli/web/iOS/android/desktop) though. react native being very close (albeit needs electron).
it surprises me that this hasn't been perfected. surely some big company would look at their balance sheet and see it's worth it even if you take a 10% performance hit on each platform, assuming you can share 90% of the code.
does swift have a good web story or is wasm the main way? desktop?
- yk09123 9mo agoI find Kotlin Multiplatform to be far and away a better experience than flutter
- wiseowise 9mo agoIn what way? It’s an unfinished, hot garbage bolted on top of Gradle. Flutter is light years ahead in terms of polish and development experience.
- palata 9mo agoI think you're confused. It's not "something on top of Gradle". For instance to run on in Swift on iOS, it has to compile to native, and then it wraps it in a C interface and finally in a Swift interface. This has absolutely nothing to do with Gradle.
- wiseowise 9mo ago> For instance to run on in Swift on iOS, it has to compile to native, and then it wraps it in a C interface and finally in a Swift interface. This has absolutely nothing to do with Gradle. And what exactly orchestrates the process of compilation (invoking Kotlin compiler + fetching dependencies)?
- palata 9mo agoWhatever you want, really. The default just happens to be Gradle because that's the default on Android. My point is that the fundamental difference between Flutter and KMP is not at all Gradle. Last time I checked, Flutter was relying on messaging. KMP leverages FFIs. Flutter is a framework, KMP is not. If all you see is the command line you invoke to run the build, I think you're missing a lot.
- websiteapi 9mo agoKotlin Multiplatform does seem pretty appealing, but haven't looked into it very much
- flax 9mo agoCould you explain why? I have been interested, in theory, in Kotlin Multiplatform. But I'm already very comfortable in Dart and Flutter. I have decades of experience with Java, Javascript, and quite a few years with Typescript. Kotlin feels like a different kind of language, one I find grating. I think this is primarily aesthetic, but it's still enough to make getting over the initial hump annoying. As petty as it is, I think the lack of statement-terminating semicolons is a major reason I do not like it. I would welcome a factual list of things that make the KM experience better for you.
- BoorishBears 9mo agoFunny you say that since Dart is the primary reason most people I know don't want to use Flutter. There's been a trend of improved DX for languages used in app development: ObjC -> Swift Java -> Kotlin Javascript -> Typescript ...Dart feels like the before with no after, even though it got traction in the era of the Afters.
- vips7L 9mo agoDarts pretty good. It has a lot of modern features, nullable types, pattern matching, sum types, and factory constructors; some really good build tooling. It can compile fully AoT.
- saagarjha 9mo agoIt’s not very good if you’re comparing it against Kotlin or Swift though.
- satvikpendem 9mo agoEh, it's getting there, slowly at first but more rapidly now. It now got tearoffs, I explained in another comment but > if you have an `enum Color { red, blue }` and a function takes `Color`, you can just do `f(.red)` not `f(Color.red)` Dart is getting new features pretty fast, they really started focusing on the DX more after Dart 2 and now especially after Dart 3. Macros were supposed to ship but it was incompatible with the goals of fast compilation, so other sorts of smaller features will ship instead.
- cageface 9mo agoThe last time I looked at it was far less mature on non-Android platforms than Flutter. Has that changed?
- crowbahr 9mo agoFlutter has been abandoned by all the large companies - Google is throwing their weight in on KMP and has laid off the flutter teams.
- websiteapi 9mo agoI heard of the flutter layoffs, but my understand is that it was unrelated to KMP. fwiw google still uses flutter
- cageface 9mo agoThis is a large exaggeration. There are still a lot of people working on Flutter at Google and large companies continue to adopt it. Google's wildly popular NotebookLM is a recently released Flutter app, for example.
- satvikpendem 9mo agoThis is completely incorrect. Large companies like Canonical are all in on Flutter even now, they're making it the default for desktop UI development in Ubuntu and are writing a lot of their own apps in Flutter. The "layoffs" were not any of the core team, it was just an offshoring, of infrastructure devs at Google that happened to work on Flutter builds, to Europe where they rehired for the same positions there.
- mdhb 9mo agoJust straight up making shit up here. WTF are you talking about?
- palata 9mo agoGoogle Workspace has been moving to KMP. They said at KotlinConf that it has replaced their decade-old transpiler from Java to ObjC, which is very impressive.
- satvikpendem 9mo agoThat's funny, I found it the exact opposite, not the least of which is that it requires a JetBrains IDE to even run it. VSCode or neovim with Flutter and really most every other UI framework like React (and Native) work great. Regarding KMP specifically, I didn't find it much use to only write business logic in one language, while still having to rewrite the UI up to 6 times (mobile, web, desktop), I'd rather have everything all in one. Compose Multiplatform looks promising as it's Flutter-like in that it renders its own UI but it's still quite early, I know they say it's "stable" but when I used it, it really didn't seem so, plus the package support is extremely lacking compared to Flutter and of course the behemoth that is React (and Native)'s npm. These days I'm looking forward to Dioxus, they're making their own native renderer similar to Flutter but especially for web, they are not doing the canvas trick, because they actually use plain HTML and CSS as their markup languages so they can compile directly to browser standards sites while still having a non-webview experience on mobile and desktop.
- kenferry 9mo agoThe bigger hit than performance is usually user experience quality and “write once debug everywhere”.
- websiteapi 9mo agotrue - though I don't think that's inherent, more just the mentality of one who might pursue this.
- wahnfrieden 9mo agoSwift on WASM also got very good last year. SQLite in WASM too. Flutter is still bad on iOS and macOS. No Liquid Glass (except some weird hack attempts that look and behave badly). Liquid Glass isn't an optional decoration, it's the name of the new system-wide UI. Leaving it out of your app is like committing to iOS 6-era skeuomorphic design after iOS 7. Edit: Several cross-platforms frameworks can do Liquid Glass: - SwiftUI by using Skip for Android - SwiftCrossUI - React Native I'm glad to see that I can finally target iOS as the first-class citizen, using Apple technologies, and then run that code on other platforms. Instead of having to use frameworks that treat iOS as secondary when it is by far the biggest money-maker for most apps.
- websiteapi 9mo agoin my experience wasm on web, though it works, has too slow a first page load time for slow connections.
- wahnfrieden 9mo agoEmbedded Swift WASM is very small now. But it is still behind on some useful capabilities like having a replacement for Codable (which last I read may be getting a more performant replacement). Regular Swift WASM got a lot smaller too last year though.
- websiteapi 9mo agointeresting - do you have a good example of a non-trivial web app that uses swift wasm?
- wahnfrieden 9mo agoGoodnotes
- cageface 9mo agoI’ve had very good experiences with Flutter on iOS and macOS. It’s actually a lot easier to get good performance in Flutter than SwiftUI. No cross platform stack can do Liquid Glass yet. You have to wonder if that was one of design goals.
- cyberax 9mo agoReact Native doesn't use Electron on mobile, it's a misconception. But it does depend on interpreted JavaScript on iOS and Android.
- websiteapi 9mo agoI mean on desktop
- avtar 9mo agoReact Native doesn’t depend on Electron for desktop apps either. It renders using native UI components and don’t use a browser engine.
- websiteapi 9mo agoI know react native for windows is a thing, but is it on par with electron these days? my understand is that it was way beyond, but I could def be wrong
- LorenDB 9mo agoQt/QML can do all those targets as well (although it is admittedly jankier on mobile than Flutter or Swift would be).
- palata 9mo agoI never understood that. Qt is C++. The only valid reason to use C++ is "not having a choice" (which happens to me, too). But if you write a mobile app, I find it extremely weird to choose C++ instead of a modern language. Disclaimer: I have seen teams writing mobile apps in Qt, and it was systematically a lot slower to develop, with a lot of pain, and resulting in worse apps. Even if you only have C++ devs, I would argue that it may be worth giving them the time to learn a modern language and write the mobile app with it.
- rubymamis 9mo agoHi there! I'm curious about the use cases people you know used Qt to develop for mobile. Do you mind expanding on this? I'd love if you could also contact me (my socials are in my profile) as I'm developing a set of components to help exactly in that situation.
- palata 9mo ago> I'm curious about the use cases people you know used Qt to develop for mobile. They were developing non-trivial mobile apps. The kind where you use your fingers on a touch screen, but that are more complex than just showing a text and an image. Say Google Maps, or WhatsApp. The problem was not the lack of components: the problem was that it was C++. C++ is more complex to write correctly than Swift or Kotlin and harder to debug. Which made those teams measurably a lot slower. It's just the wrong technology for the use-case, IMO.
- rubymamis 9mo agoI also write complex UIs with QML and C++. I do not consider myself an expert in C++ but there is clearly a subset of it that I feel comfortable in. I think the combo of QML & C++ is great since QML lets you focus on the UI - and does a great job at it, and in C++ you can write performant code. C++ isn't that complicated these days - if you stick to a subset you're familiar with.
- SchwKatze 9mo agoThere is also Dioxus
- satvikpendem 9mo agoI was initially uninterested in Dioxus because they just used webviews but their native renderer is really interesting now because it has a lot of strengths, using plain HTML and CSS as the markup language so that they don't have to render to a canvas on the web like Flutter, Compose Multiplatform or many other WASM based renderers do, as they can just, well, ship the HTML and CSS directly. But then on mobile and desktop, it will be rendered without a webview, so you get all the benefits of each platform.
- topspin 9mo ago> it surprises me that this hasn't been perfected It shouldn't. It's never really been perfected across native GUI APIs after 40+ years: just various degrees of "good enough," plus fobbing it off to web stacks. Anyhow, I've been playing with gioui, which is golang rendering in a lightweight <canvas>-like. Really nice: fast, small, cross platform GUI with just Go. Scale expectations appropriately.
- andycall 9mo agoReact/Vue + TailwindCSS are now ready for building Flutter apps. https://openwebf.com/en/blog/announcing-webf https://openwebf.com/en/blog/announcing-webf