Live data from Hacker News

Ask HN: How do you create a cross-platform GUI without using Electron?

news.ycombinator.com

21–30 of 112 posts

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#22
post #7

There are several options, each with their own pros and cons. Qt [1] The main codebase is C++, but bindings are available for Python and several other languages. I have developed and shipped multiple cross-platorm applications using Qt, using both C++ and Python. Documentation and source code examples are readily available. JUCE [2] Another C++ framework, with Python bindings. The focus is on music and audio apps, bu…

I am really looking forward to the day that I can build cross-platform GUI apps in Red. Based on Rebol, it is a beautiful yet powerful language. They are always looking for more contributors, if anyone is interested.

Here's an example of what it could do on macOS four years ago: https://www.red-lang.org/2017/07/063-macos-gui-backend.html

Edit to add: You can build cross-platform GUI apps in Red now but, while they're very close to the finish line, and making progress every day, there are still a few missing pieces yet to complete on the 1.0 roadmap.

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#25
Sciter [1] is kind of a really lightweight electron. It's about 8Mb, cross platform, and you can either run it standalone (like electron) or use it as a library from Rust/D/Python/C#/whatever. You pay for the small size with a lack of compatibility with the existing Javascript ecosystem. Any moderately complex JavaScript library that interacts with the dom will probably use something that Sciter doesn't implement, so you end up reimplementing stuff like graph libraries. On the other hand there are a couple of very useful additional APIs that regular browsers don't have (like SQLite, control over window borders, transparent windows etc).

1: https://sciter.com/

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#26
https://news.ycombinator.com/item?id=28469498#28475543

> Free and open source: https://www.lazarus-ide.org/index.php

> Other 30+ cross-platform GUI toolkits / frameworks: https://www.slant.co/topics/983/~best-cross-platform-gui-too...

Lazarus has the opposite problem of all the other UI toolkits - relatively awesome UI across all platforms (especially if you're a fan of WinForms) but stuck with only support for Pascal.

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#27
post #7

There are several options, each with their own pros and cons. Qt [1] The main codebase is C++, but bindings are available for Python and several other languages. I have developed and shipped multiple cross-platorm applications using Qt, using both C++ and Python. Documentation and source code examples are readily available. JUCE [2] Another C++ framework, with Python bindings. The focus is on music and audio apps, bu…

Vote for Flutter and QT

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#28

There is also an interesting solution to this problem: use native WebView, so you don't have to pack the whole Chrome with your app. Basically every "electron alternative" with HTML+CSS+JS works this way. https://github.com/sudhakar3697/electron-alternatives

You'll have a little bit more testing to do, as the web-views shipped by different OS might not be exactly in sync feature wise, but if your app is really simple it shouldn't be much of a problem.

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#29
I'd highly suggest using Dart and Flutter.

I've probably written GUI apps in C, Java, Ruby, Objective-C, Swift, JavaScript, and probably a couple I forgot about. Dart+Flutter come the closest to being "good" and correct. There's some missing documentation for Desktop development with regards to Flutter + Dart but nothing is totally intractable if you're willing to read through issues. My only caveat is that Google is truly an awful company to depend on for your business; since, they 100% do not give a a single fuck about you unless you're paying them ~$100 million or more a year, or an EXTREMELY high profile client.

I've been getting ready to give Pascal a solid try but I still totally lose my mind when working in Lazarus (like where did the thing I just used go? Ah yes, tiny, free-floating window, of course). I have a feeling Pascal is probably the real diamond in the rough of UI application development these days.

Qt is probably fine but their licensing turns me off from ever using or considering it.

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#30
Delphi, believe it or not. Might even be the most mature and feature-rich of any of the technologies and frameworks mentioned here.

RAD Studio 11 just got released and allows native development for "all platforms" from a single codebase and GUI at the click of a button. [0]

I have ranted about and harshly criticised Embarcadero's misguided product policies as much as the next guy but that doesn't change the fact that Delphi is still the most mature and versatile Rapid (sic) Application Development environment out there, especially if UX and UI are important to you.

And the twenty-year old adage that you can knock out an MVP with a really nice and polished GUI in a Saturday afternoon is now even more true than ever.

In the end, a native binary with a small footprint (easily 1/100th the size of an Electron project) will fall out at the press of the F9 key and that's really something to behold...

The free Delphi community edition [1] might even offer all the features that you need, although I really wish Embarcadero would see the light already and sync its release cycle with the full version.

Delphi might not officially be regarded as hip or cool these days (mostly due to severely and ongoing errant product and community management by the company that makes it) but some great people and brilliant minds are associated with it and compared to the olden days Delphi is now somewhat of a secret underground Swiss army knife that ironically gets used now mainly in big and medium corporations.

I like to think its versatility combined with the fact that it's technically uncool and against the mainstream to do projects in Delphi these days might fit a hacker's (and HN user's) mindset very well...

[0] https://www.embarcadero.com

[1] https://www.embarcadero.com/products/delphi/starter?aldSet=e...

Post reply on HN