3 ms·
IMO this is an impossible dream and folks need to stop chasing it. Particularly when you’re trying to do desktop and mobile in one, they’re just totally differe
by afavour 2y ago
IMO this is an impossible dream and folks need to stop chasing it. Particularly when you’re trying to do desktop and mobile in one, they’re just totally different paradigms.
The alternative, which I have found far more preferable: code app logic in Rust, which can be mapped to Swift, Kotlin and JS (via WebAssembly). I’m sure Go, Zig or whatever is capable of similar, I’ve never explored it. Then map that shared code to native UI.
SwiftUI and Android Compose are far from perfect but they’re 100x more understandable than what came before and have a lot in common with the React model of UI. It’s more work upfront but in the longer term I think it’s better to be using OS UI frameworks directly rather than adding a dependency between you and the OS.
- Groxx 2y agoYeah. The more time I've spent writing code, the more I'm convinced that a largely agnostic core and a thin UI per target is the only reasonable option. That "thin UI" can leverage a cross-platform toolkit for the long tail of lower value targets, that's completely reasonable because that's what they excel at. But you'll pay (a lot) for it later if it's not aggressively simple and disconnected from your internals, because those tend to have very painful major version migrations. As a bonus: doing it this way generally gets you MUCH simpler and more testable core systems, and MUCH better accessibility.
- tracker1 2y agoAs much as it sucks in a lot of ways, I think Tauri and similar embedded browser control options may be the best option today for cross-platform mostly native application logic. The browser's support of HTML+CSS is just that good. I would like to see tighter integration into at least platform configurations for the primary background, activity and accent colors and typography/fonts. Beyond this approaches, such as Material, etc are common enough that they don't feel too alien in applications. Maybe more so on mac, but still. At this point, if a tool doesn't support Windows, Mac AND Linux, I'm pretty unlikely to touch it. I know Linux is a minority here, but it's disproportionately large for developers on their own hardware at this point. I'm tired of working with things that don't advance what I can use on my own.