Hacker News new | ask | show | jobs
by hbn 1230 days ago
The more "solutions" that are developed for desktop + mobile cross-platform applications, the more I see highlighted how different the paradigms are, and how the streams really shouldn't be crossed.

They're both UIs viewed on a screen that you interact with by pointing and clicking, but the similarities end there. The entire output of this cross-platform effort has been awkward applications that run everywhere but feel right nowhere. It's sad that even Apple has fallen victim to this idea that with their horrible Catalyst apps. Though I understand why the sales pitch of "one codebase" makes management of so many companies salivate.

9 comments

That's nice if you have the funds and time for that. Fully native is ideal.

But I don't agree cross-platform can't feel "right". Flutter's approach it can't. React Native's it can. Qt vs WxWidgets all over again.

If I had to duplicate my codebase for each platform and learn each IDE/language just to continue my app, it would never exist.

I solely created and maintain the iOS app, the Android app, and the web app for my company and for my side projects thanks to React Native.

I can extend any native api or view, I can learn middle out for each platform.

I can abstract and swap out any file or conditionally style based on platform.

I developed the web app first using React Native Web. It took me a month to get the iOS and Android app released to the store.

No Ionic or web wrapper crap needed... The one thing is getting the React stack and tooling just right.

So it's Expo or devote quite a bit of time in the beginning to your stack.

> Qt vs WxWidgets all over again.

Not sure how to interpret. Pro Qt or pro wx? I'm assuming the latter.

But I don't even agree. Qt is/can lay claim to native as much as anything else on desktop Linux/BSD. The quality of the Windows emulation has always been excellent as far as I'm concerned, at it's been pretty goodish on Mac.

But I've never seen a perfect cross platform library that targets Mac.

wxWindows may use system drawing at the low level, but those that have been in this for years know what's up: it's just an unholy messy quasi-MFC (Microsoft Foundation Class) looking thing - the model is inherently MS Windows from 1994. This is not magically going to work well as a Cocoa app just because it uses NSViews under the hood. And although the simple controls may use the OS, all the complex ones have tons of internal design. Like this is optimizing the wrong thing - as a normal person I probably care more about the look and feel of the tree view, whereas only the weirdos on here are going to get bent out of shape that some button text is a few pixels off - getting both right is nice, but only hitting the last one is pointless.

I've never seen a nontrivial wxWindows app that would fool anyone on MacOS. Qt can get much closer if you work at it a bit. So in practice I would say you can do better with Qt for the major desktop targets.

These are all compromises. And native hardly means anything these days. Yes Windows has what has been retconned as WinForms, but otherwise, the UI LnF of Mac OS is a constantly moving target and Windows has never been as consistent as people seem to believe. Linux/Desktop Unix - lol.

I'm not sure we can blame either for the macOS support.
or,just use flutter these days
Fully native isn't especially realistic. At the risk of sounding like a broken record, general purpose tooling written by a small team can't support multiple native UIs.

What often works for me is something like Wails, but it has its limitations. For instance there's no multi-window functionality there either, and while the new Wails supports more OS integrations there's still some aspects that need improvement to compete with native UI.

I'd love to try Flutter, but frankly I don't want to write "backend-ish" code in Dart. There's some projects to be able to build UIs in Flutter and have processing done by a separate language that all gets bundled as one, but they're mostly hobby projects.

Having worked on projects for both mobile platforms with small teams, I find that cross platform UI frameworks only really make sense for somewhat simplistic apps. The more involved the app in question is, the more these frameworks incur overhead with the extra surface area for bugs to occur on which is multiplied by the number of supported platforms.

The story on desktop is a little better but the same principle applies to some degree.

I’m shocked they’re still using Dart. Even if Dart is good, it’ll still be what prevents flutter from being widely adopted
It's an obvious area for a PR boost if the chips are looking down.

I can see the HN headline now...

"Rust support added to Flutter [34,432 karma]"

I'm using flutter_rust_bridge, it works pretty well. However, I do like Dart due to a few features it has, like code generation so that I can build my own language features if I want to, I use that pretty extensively.
If you have the money, make everything native, but until then I can build a Flutter app that works on 6+ platforms for the price of one, which is a real competitive advantage for a solo developer running a startup.
One thing I learned though... if you say are going to deploy on say, Android, you are not getting away from its dev toolchain and API if you want to do anything non-pedestrian. Same for iOS and possibly Windows.

So you often end up really having to learn N+1 platforms.

I think Flutter is the best option right now to release your idea on mobile, web and desktop platforms yourself without hiring additional people. The only other realistic option I know of is to use web tech. Are there other good options for single devs?
The point of seriously (key word) using x platform tools is to ship fast and solve customer problems.

If the particular experience you want isn’t supported, creativity is required to either:

A) use an alternate experience. Users literally don’t care as long as their problem is solved. They don’t care if it’s using X api or multi window or whatever. Just use tabs for all they care.

B) build the experience as a lib and maybe open source it

Anything else is for hobbyists.

Well, web designing does blur the lines. You can easily create a website that is both desktop and mobile friendly by implementing responsive design. Translating that to a native experience seems to be the problem
You only need to look to SwiftUI to realize that this is false.

SwiftUI has a lot of problems, but Apple has done great work building components and paradigms that adapt to the target device.

For example, check out how forms are defined: https://developer.apple.com/videos/play/wwdc2022/10052/

Defining an interface this way saves time for developers and provides consistency to users who use apps across different devices.

I largely agree with this when the application will be used heavily on each platform. I think desktop + mobile cross-platform does work when one platform is primary and the second secondary (ex. IOT devices). You can then have an interface primarily focused for an embedded application, and then when data transfer or settings for the embedded device needs to be configured, configuring it from the desktop is easier, and having a similar interface all around is beneficial.
I wonder how many people Maxis employed when they made Sim City 2000? Because it had a native UI for every platform it was ported to that had a windowing and widget toolkit.

I just can't help but think that either programmers today have abstracted themselves into a lot more work than need to do, or they're just significantly less capable over all than the programmers of old.