5 ms·
Ask HN: 2020, Language and Framework for Cross Platform Dev (Especially Desktop)
I'm building a certain project and even though I'm a little biased towards just developing it for the Mac since I don't want to write and/or maintain 3 repositories for it , I'd like to know what HN community thinks would be a good selection right now
- Lionga 7y agoFlutter supports iOS and Android fully and beta support for Web, Windows and Mac all from a single code base. It has a pretty awesome developer experience and for me is the clear winner for Cross Platform Dev.
- aliezsid 7y agoI've tried flutter components and as much I liked Dart, for some reason I wasn't a fan of the Layout system and the archived outputs are a bit bulky so those are a few reason that drift me away from it.
- deleted 7y ago[deleted]
- karmakaze 6y agoThe layout system is my favorite thing about Flutter. For one, there's only one not Android vs iOS. Secondly, it's not CSS. As a bonus, it's easy to compose or programmatically generate.
- aliezsid 6y agoI'd agree that it's easy to compose but the API of the properties the components expose are inconsistent in certain cases and if I can get a native build out of it, I shouldn't be complaining about a minor issue
- manicbits 7y agoElectron works great if done right (see Visual Studio Code).
- aliezsid 7y agoI mean, the unneeded bloat from electron isn't something I want. I don't like when my apps take up a lot of space on the system when it doesn't need to. But thanks anyway. I've built a few apps using Electron before.
- brudgers 7y agoIt doesn't sound like cross platform development is very important for this project.
- aliezsid 7y agoand why do you think so?
- cercatrova 6y agoBecause if it were the main priority, you would have no reservations using an inefficient but working solution like Electron, is probably what the parent means.
- aliezsid 6y agoI want the app to cross platform but not at the expense of a Ram hungry app that I just throw out. And yeah, i wouldn’t mind writing the logic in a language like rust or C and then invoking it from the native bindings If there’s no other solution out there for me to achieve performance over the so called “Let’s bundle the whole browser with every app” working solution.
- satvikpendem 6y agoYou should check out Flutter then, it compiles to native machine code for mobile and desktop (Android, iOS, Windows, macOS, Linux are all supported with native compilation), and uses WASM for web. It's a much more performant solution than Electron. Only thing is the official Flutter desktop implementations are unstable for production, but there are unofficial implementations which are stable [0] [1]. You can use those until the official implementation is stable. You can also use Dart's FFI if you want but since it's compiled instead of interpreted like JS and Electron, you probably don't need to, the performance will be there. You also said you don't like the layout system, but there are packages for that [2]. Let me know what else you would find annoying, there are usually packages for most things. There are even algebraic data types in Dart through code generation. [0] https://github.com/flutter-rs/flutter-rs https://github.com/flutter-rs/flutter-rs [1] https://github.com/go-flutter-desktop/go-flutter https://github.com/go-flutter-desktop/go-flutter [2] https://github.com/ReinBentdal/styled_widget https://github.com/ReinBentdal/styled_widget
- hannofcart 7y agoQt, because it has reasonably mature bindings in most languages you'd want to use. The bindings for Python seem the most mature though I have used the Golang bindings with reasonable success as well.
- aliezsid 7y agoWill try it out.
- Foober223 7y agoBack end in portable C or C++. Front end using the native OS GUI features. Compile separately for each platform. Many developers may not be a fan of this, but it's the best kind of cross platform for the users. If you need something of heirloom quality on the front-end it's the way to go. But if front-end GUI widgets literally are your app or a high % of it, then this falls apart. You're basically maintaining 3 separate apps at that point.
- aliezsid 7y agoit is mostly GUI, yeah I might just go with the native languages to build it since the bundle sizes and performance are the kinda important. I guess I'll start with one platform first and then get to the others.
- detaro 7y agoFor desktop across Windows/Mac/Linux without further context given: Qt would be my default answer
- aliezsid 7y agoThere’s 2 projects. One is my take on a code editor and the other is a minimal inventory management system and even though I can gt through with just building one for Mac and the other for just Windows. I’d still prefer going with. Cross platform approach
- karmakaze 6y agoThis is something I've often wondered and don't have a great answer for. Ideally, I'd like to use a statically-typed, garbage collected (maybe reference counted/managed) language. There used to be Adobe AIR, JavaFX, Silverlight. Now we have Electron, Qt, maybe Flutter soon. Is Eclipse RCP or Netbeans still viable?