TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Cross-Platform GUI Toolkit Trainwreck (2016)

167 pointsby aparashkabout 6 years ago

24 comments

phtrivierabout 6 years ago
So many sub-debates hidden in this &quot;cross-platform native GUI&quot;:<p>1) I want to write a GUI code <i>once</i><p>2) I want to ship <i>something</i> that works on Windows &#x2F; Linux &#x2F; MacOS<p>2.1) I want to ship <i>something</i> that looks the <i>same</i> on Windows &#x2F; Linux &#x2F; MacOS<p>3) I want to ship a <i>binary</i> that works on Windows, a <i>binary</i> that works on Linux, a <i>binary</i> that works<p>3.1) I want to ship a <i>small</i> and <i>efficient</i> binary<p>4) I want to ship <i>something</i> that looks like a Windows app on Windows, a Linux app on Linux, a MacOS app on MacOS, etc...<p>(By definition, &quot;I want to ship something that looks the same everywhere <i>and</i> looks like an app of my host&quot; is meaningless, right ?)<p>The &quot;holy grail&quot; seems to be:<p>5) &quot;I want to write a GUI code <i>once</i> that generates small efficient binaries that looks exactly like an app of the host OS, and if possible looks the same everywhere, and let me go back to writing my business logic rather than agonize over drawing a button.&quot;<p>It&#x27;s seems from the debate that nothing obvious fulfills 4 and 5.<p>Then it comes to which requirement you&#x27;re ready to drop.<p>If you&#x27;re ready to drop requirement 2) , I suspect you&#x27;re doing MacOS specific, go for it ;)<p>If you&#x27;re ready to drop requirement 1) , I suspect your managers &#x2F; salespersons disagree.<p>I suspect your manager &#x2F; salespersons do not care about requirement 3.1), but it&#x27;s debatable. Use Qt&#x2F;Electron, and ship <i>something</i>.<p>I suspect your manager &#x2F; salespersons do not care about requirement 4), and I suspect they&#x27;re esthetics, which can not be defended.<p>I gave up waiting for someone to make 5, and don&#x27;t have the resources &#x2F; skill &#x2F; time to do it myself. And maybe we should stop caring and watch the sky instead.<p>I hope someone is able to get to 1 + 2.1 + 3.1 someday.<p>I&#x27;ll use that.
评论 #19752080 未加载
评论 #19751115 未加载
评论 #19750341 未加载
评论 #19750505 未加载
评论 #19751317 未加载
评论 #19752248 未加载
评论 #19750782 未加载
评论 #19751687 未加载
评论 #19750280 未加载
评论 #19752396 未加载
评论 #19775382 未加载
评论 #19750857 未加载
saagarjhaabout 6 years ago
To date, the best solution to this problem that I have seen is to write all your core code in a shared library using something like C++, and then hooking it up to a thin layer of completely native, platform-specific code for the UI. It’s fast, lightweight, looks good, and requires minimal extra code if you do it right.
评论 #19747169 未加载
评论 #19747813 未加载
评论 #19747045 未加载
评论 #19749822 未加载
评论 #19747827 未加载
deathtrader666about 6 years ago
Wonder how the author didn&#x27;t come across Qt or wxWidgets in his research?
评论 #19747462 未加载
评论 #19747756 未加载
评论 #19747254 未加载
评论 #19747758 未加载
评论 #19754073 未加载
评论 #19747527 未加载
hguhghuffabout 6 years ago
Anyone got experience with this? <a href="https:&#x2F;&#x2F;webkit.org&#x2F;wpe&#x2F;" rel="nofollow">https:&#x2F;&#x2F;webkit.org&#x2F;wpe&#x2F;</a><p>Here it is in use on raspberry pi <a href="https:&#x2F;&#x2F;medium.com&#x2F;@decrocksam&#x2F;building-wpe-webkit-for-raspberry-pi-3-cdbd7b5cb362" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@decrocksam&#x2F;building-wpe-webkit-for-raspb...</a><p>A long video on it: <a href="https:&#x2F;&#x2F;m.youtube.com&#x2F;watch?v=klfE6m1oCkg" rel="nofollow">https:&#x2F;&#x2F;m.youtube.com&#x2F;watch?v=klfE6m1oCkg</a><p>A short video on it: <a href="https:&#x2F;&#x2F;m.youtube.com&#x2F;watch?v=wVSwkj9McCU" rel="nofollow">https:&#x2F;&#x2F;m.youtube.com&#x2F;watch?v=wVSwkj9McCU</a><p>It says: &quot;WPE is the reference WebKit port for embedded and low-consumption computer devices. It has been designed from the ground-up with performance, small footprint, accelerated content rendering, and simplicity of deployment in mind, bringing the excellence of the WebKit engine to countless platforms and target devices.&quot;<p>I&#x27;d be interested to know how to use it.
awaltonabout 6 years ago
&quot;GTK2 is too big&quot;<p>&quot;Just use Java or Electron&quot;<p>I&#x27;m sorry, I just can&#x27;t reconcile the logic here.
oblioabout 6 years ago
For the Java bit, I imagine that with modern Java versions with modules the app would be a lot smaller. The new Java versions are modular so you can include just what you use and I think it can even create a native package for installation. It should bring NodeNox 3 down from that 220MB package.
resoluteteethabout 6 years ago
One warning: if you try to implement your own gui widgets in opengl, unless you&#x27;re really careful you&#x27;re not going to support accessibility tools such as screenreaders or Japanese&#x2F;Chinese text input at all.
评论 #19750205 未加载
almostarockstarabout 6 years ago
We already have browsers installed that are designed to render arbitrary cross-platform GUIs based on HTML&#x2F;CSS.<p>Why can&#x27;t I write a desktop application that just asks the OS for the users preferred browser and provides it with HTML&#x2F;CSS and UI interaction callbacks &#x2F; events? Render it in a native looking window.<p>We shouldn&#x27;t <i>need</i> Electron at all! It&#x27;s like we all have this fantastic rail transport network but insist on riding in our own trains.
评论 #19749784 未加载
评论 #19750602 未加载
评论 #19750554 未加载
评论 #19750295 未加载
评论 #19751106 未加载
FraKtusabout 6 years ago
I think he got it wrong when he quickly ruled out IMGUI, as you can use it to create a small app with next to no dependencies. He complains that you need to redraw your GUI at 60 FPS, but this is wrong, you should be able to draw with it only when needed. I am a big fan of Nuklear. I can write a tiny C app that compiles on macOS, Windows, iOS, and Android with it. The look and feel of Nuklear can be something you don&#x27;t like, however.
评论 #19749181 未加载
vorticoabout 6 years ago
If you need native look and feel: <a href="https:&#x2F;&#x2F;github.com&#x2F;andlabs&#x2F;libui" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;andlabs&#x2F;libui</a><p>If you need HTML5 canvas-style drawing: I propose building an (abstract) SVG document and render with Skia. When part of the SVG document changes, that part will be redrawn by Skia, just like an interactive SVG in your browser. Disclaimer: I haven&#x27;t tested this idea.
vram22about 6 years ago
Adding my 2c (of anecdote) to this thread:<p>Andy Brice of successfulsoftware.net has a long-time product, Perfect Table Plan (computes seating plan for weddings, given various inputs) that used Qt (and C++), I&#x27;ve read, on his blog. PTP has been there for years now. Seems to be doing well, based on what he says about it. Don&#x27;t know how good the Windows vs. Mac versions are, but at least they are there. His newer product HyperPlan may also be on the same stack.<p><a href="https:&#x2F;&#x2F;www.perfecttableplan.com&#x2F;html&#x2F;about_us.html" rel="nofollow">https:&#x2F;&#x2F;www.perfecttableplan.com&#x2F;html&#x2F;about_us.html</a><p>No connection, just have followed the blog for long.
dysocoabout 6 years ago
I know the author focused on Nim, but I wonder how Lazarus (or Delphi I guess) would fare.<p>Sadly it&#x27;s FreePascal, but it really does look like the less bullshit platform to make cross-platform desktop applications.
评论 #19751508 未加载
ryanmarshabout 6 years ago
This is exactly why I say Electron is going to “win” in the cross platform GUI toolkit space. I do not think this is good thing. Cross platform GUI dev has been a train wreck as far back as I can remember. Contrast that with the immense amount of human years invested in making the browser a cross platform GUI runtime.<p>I’m sorry folks, 198MB menu bar apps is what we’re going to have unless a cross platform GUI effort equivalent to that of Chromium comes about.
analognoiseabout 6 years ago
FreePascal&#x2F;Lazarus : cross platform native GUIs out of the box. Super small executables. No bloat.<p>For the love of God, check it out.
TJSomethingabout 6 years ago
To add a little data on my experience last time I tried this, using UPX [0], you can get GTK+ 3 down to 9 MB. Most of the size of Qt comes from ICU, which can be feature selected to decrease its size [1]. With that and UPX, Qt can get down to 16 MB. And those can both be compressed another 30% with ZIP files for shipping.<p>While those aren&#x27;t great numbers, I personally think it&#x27;s tolerable for most usages.<p>[0] <a href="https:&#x2F;&#x2F;upx.github.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;upx.github.io&#x2F;</a><p>[1] <a href="https:&#x2F;&#x2F;ssl.icu-project.org&#x2F;datacustom&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;ssl.icu-project.org&#x2F;datacustom&#x2F;index.html</a>
NikGeeonxabout 6 years ago
I like the idea of having one c-sourcecode compiling on Linux, macOS and Windows. Hence, I have developed a platform independet GUI called Geeonx <a href="https:&#x2F;&#x2F;www.geeonx.org" rel="nofollow">https:&#x2F;&#x2F;www.geeonx.org</a> .<p>Versions for Linux and MacOS X are ready for download. The version for Windows will follow soon - I will speed up development if someone claps in his hands.
ianharriganabout 6 years ago
Hi all, one option might be HaxeUI (full disclosure, im the author!) :)<p>Its essentially a UI abstraction that delegates certain things &quot;backends&quot;<p>site: <a href="http:&#x2F;&#x2F;haxeui.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;haxeui.org&#x2F;</a> github: <a href="https:&#x2F;&#x2F;github.com&#x2F;haxeui&#x2F;haxeui-core" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;haxeui&#x2F;haxeui-core</a> discourse: <a href="https:&#x2F;&#x2F;community.haxeui.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;community.haxeui.org&#x2F;</a><p>It uses the Haxe language (haxe.org), here is a very small&#x2F;simple&#x2F;dumb sample of it &quot;in action&quot;: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=cijUTbMKMHI" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=cijUTbMKMHI</a><p>It can use native components (wxWidgets, android, html5) but you can fairly easily extend it to use other &quot;backends&quot; (like Qt for example - i havent written that backend yet, but its something ill almost certainly do)... It can also handle drawing the components in a variety of methods (so called &quot;composite backends&quot;).<p>Im currently aiming to get it out of alpha asap, and most work goes into &quot;new-component-method&quot; branches (these will become master shortly). Documentation is pretty slim at the moment, but something im actively working on, two examples that i just wrote up today in fact are:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;haxeui&#x2F;haxeui-guides&#x2F;blob&#x2F;master&#x2F;custom-components.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;haxeui&#x2F;haxeui-guides&#x2F;blob&#x2F;master&#x2F;custom-c...</a><p>and<p><a href="https:&#x2F;&#x2F;github.com&#x2F;haxeui&#x2F;haxeui-guides&#x2F;blob&#x2F;master&#x2F;modules.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;haxeui&#x2F;haxeui-guides&#x2F;blob&#x2F;master&#x2F;modules....</a><p>Let me know if you have any questions! Ian Harrigan<p>Heres some other links &#x2F; screens that may be useful:<p><a href="https:&#x2F;&#x2F;twitter.com&#x2F;IanHarrigan1982&#x2F;status&#x2F;1111348116433850368" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;IanHarrigan1982&#x2F;status&#x2F;11113481164338503...</a><p><a href="https:&#x2F;&#x2F;twitter.com&#x2F;IanHarrigan1982&#x2F;status&#x2F;1090535390598041600" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;IanHarrigan1982&#x2F;status&#x2F;10905353905980416...</a>
netrapabout 6 years ago
Weird article. Why write an entire cross-platform GUI toolkit when he could port IUP to OS X? :)
Timothycquinnabout 6 years ago
These days, Xamarin looks interesting. Can target windows, Linux, Mac, Android and IOS. I have not used it yet but if I get a project that needs full Cross platform distribution, I would probably use xamarin with a F# code base where possible.
Wyndtroy2012about 6 years ago
Given the other applications you chose to look at, I&#x27;m surprised you didn&#x27;t also look at Audacity. It uses wxWidgets, which is a nice C++ cross-platform GUI framework. It wraps native controls on each platform it supports, and also has a &quot;Generic&quot; variant where it draws its own. It&#x27;s not very heavy as these things go, and has a nice python binding called wxPython.<p>I&#x27;d check it out before rolling my own :)
评论 #19747102 未加载
评论 #19747797 未加载
paulcarrotyabout 6 years ago
<a href="https:&#x2F;&#x2F;proton-native.js.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;proton-native.js.org&#x2F;</a>
_pmf_about 6 years ago
Oh, are we having this discussion again?
评论 #19749098 未加载
_bxg1about 6 years ago
Mostly good article, but I don&#x27;t appreciate the gratuitous dunking on web devs towards the bottom:<p>&quot;so developers can use hipster technologies like HTML, CSS and JavaScript&quot;<p>&quot;the vast armies of newskool web developers who grew up on JavaScript and the DOM&quot;<p>...especially when the author doesn&#x27;t really appear to know what he&#x27;s talking about in that space:<p>&quot;And when things don’t quite work as expected, you can’t do much about it—short of maybe just switching to a different framework as a last attempt.&quot;<p>&quot;and long-term maintenance will be a nightmare.&quot;<p>&quot;web development technologies—which technically don’t provide any advantages over more traditional approaches&quot;<p>There are legitimate criticisms of Electron as a choice for desktop apps, but that doesn&#x27;t invalidate an entire domain&#x27;s worth of developers.
评论 #19751062 未加载
lmmabout 6 years ago
What is this ridiculous obsession with executable size? How much time did this author spend chasing down alternatives to a measly 120MB? If they&#x27;re working on art project then fair enough, but if they&#x27;re working on a useful program then surely anything else they could have done with that time would have brought more value to end users than shaving off 3 cents&#x27; worth of disk space.
评论 #19747513 未加载
评论 #19747308 未加载
评论 #19747367 未加载
评论 #19747749 未加载
评论 #19749280 未加载
评论 #19748517 未加载
评论 #19749099 未加载
评论 #19747729 未加载