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.

Create Desktop Apps with HTML5 and Go

115 pointsby folknorover 6 years ago

19 comments

rolleiflexover 6 years ago
I&#x27;m doing something similar (Go-based desktop app) with Aether (<a href="https:&#x2F;&#x2F;getaether.net" rel="nofollow">https:&#x2F;&#x2F;getaether.net</a>), without requiring any additional tools.<p>The short version is, I have an Electron app, but the extent of my JS is just skin — the UI. The JS talks to two Go daemons which do the 99% of the work. It&#x27;s also much more memory efficient than doing it in JS, and allows for massive parallelism. So you get best of both worlds, speed &#x2F; clarity of Go, and well-developed JS UI patterns (Vue). It works well, with the caveat being a tradeoff in complexity in incorporating gRPC to let daemons talk to each other.<p>Here&#x27;s the source code: <a href="https:&#x2F;&#x2F;github.com&#x2F;nehbit&#x2F;aether" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nehbit&#x2F;aether</a>
tracker1over 6 years ago
Electron is too bloated and heavy, and doesn&#x27;t meld with the desktop... hey, lets create a new system that uses the same bloated&#x2F;heavy bits as electron and also the UI that doesn&#x27;t blend well.<p>edit: okay, so it doesn&#x27;t have to download as much since it uses the already installed chrome, meaning you have to conform to ??? from an app perspective to your JS... you may as well just use electron or carlo
评论 #19149890 未加载
评论 #19149920 未加载
JeanMarcSover 6 years ago
Well, on one hand it will certainly lighten the ressources needed.<p>On the other hand, you don’t know on what version of Chrome&#x2F;Chromium you’ll land so you won’t be able to use specific API for sure.<p>But for having developed in the end of the 90’s a web kiosk software, based on Internet Explorer (I think it was IE5 back then), software that still have last versions running (no one, including myself, would thought it’ll survive that long), I will sure have a look closer on the project if you can intercept the before navigate event (or whatever the name is with Chrome)
评论 #19145535 未加载
评论 #19149879 未加载
评论 #19149784 未加载
candiodariover 6 years ago
Man, that slidedeck is frightening for someone who wants functional applications:<p><pre><code> Well-designed and attractive typographymakes content meaningful. Animation makes important parts standout and helps with micro-interactions. Onboarding, common for web andmobile apps, helps more than traditional&quot;F1&quot; button. Visual trends may change and it shouldnot be hard to update the UI withoutrewriting it all. </code></pre> The result is what used to be described as &quot;flash websites&quot;: everyone has their own UI, with custom animations that mean something entirely unique to that application which may or may not make sense to you.<p>But I could not explain this half as well as these articles about Flash. They also apply to HTML5.<p><a href="https:&#x2F;&#x2F;www.nngroup.com&#x2F;articles&#x2F;flash-99-percent-bad&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.nngroup.com&#x2F;articles&#x2F;flash-99-percent-bad&#x2F;</a>
zbruhnkeover 6 years ago
Every time I see these things I just sit in relative disbelief trying to figure out how PWAs have somehow not taken off yet.<p>Perhaps this year when they finally come to Mac too (they already work on Windows and Linux) it will finally happen. then again with the Mac App store I&#x27;m not sure that fits the Apple &quot;vision&quot; (if you can call it that anymore) either.<p>Either way its sort of maddening to see this as I think PWAs are the right answer for these questions and yet people keep bringing new and unnecessary solutions to the table
评论 #19150062 未加载
评论 #19149893 未加载
alexandernstover 6 years ago
I fail to see how this is any resource-lighter than Electron. It still uses a browser. It might or it might not be Chrome, but it&#x27;s still a browser, so it will certainly use, give or take, the same amount of resources the average browser takes.<p>The only thing I do see as an advantage is the reduced size in the distributable. But, imho, size really doesn&#x27;t matter these days.
评论 #19142719 未加载
chenzheklover 6 years ago
In case you are interested, there is a flutter based GUI framework for Go, which looks promising. <a href="https:&#x2F;&#x2F;github.com&#x2F;Drakirus&#x2F;go-flutter-desktop-embedder&#x2F;blob&#x2F;master&#x2F;README.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Drakirus&#x2F;go-flutter-desktop-embedder&#x2F;blob...</a>
spacenick88over 6 years ago
Can anyone tell me what mechanism would prevent any other software on the same system from intercepting the connection to Chrome? This isn&#x27;t really an issue when running with X11 on Linux as any app can grab text from another window but e.g. Wayland provides much better barriers between apps.
评论 #19149937 未加载
mikewhyover 6 years ago
Webview seems interesting. Go&#x2F;C++ to do native stuff and use the systems web view to render the interface. Seems like the best of both worlds.
AnIdiotOnTheNetover 6 years ago
It is a bit weird to me that people are so intent on reinventing HTAs.
评论 #19153176 未加载
评论 #19150983 未加载
评论 #19148111 未加载
sfifsover 6 years ago
This looks really interesting! I actually love browser&#x2F;html&#x2F;javaScript as a UI significantly over &quot;native&quot; but creating Electron based stuff always has me worried shipping a gigantic bloat and keeping it updated.
marticodeover 6 years ago
Alternative that uses the system webview rather than requiring Chrome: <a href="https:&#x2F;&#x2F;github.com&#x2F;zserge&#x2F;webview" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;zserge&#x2F;webview</a>
zemnmezover 6 years ago
the weakest point in systems like this is usually the mechanism by which the local process communicates with the browser. it&#x27;s very hard to secure such a mechanism properly as there&#x27;s no official API for it<p>this claims to use the chrome devtools debug protocol, which I believe is usually entirely unauthenticated. i would not be surprised if someone can compromise this system via this protocol<p>edit: this happened already with node in the case of CVE-2018-7160
chmikeover 6 years ago
HTML is really bad to create GUI applications, and it uses javascript. It&#x27;s not a pure Go desktop application.<p>A Qt equivalent in go would be worth considering.
irq-1over 6 years ago
There is also <a href="https:&#x2F;&#x2F;sciter.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sciter.com&#x2F;</a><p>It&#x27;s non-free but you can &quot;Use Sciter in binary form as it is published on the site&quot; so cgo with bindings and the downloaded binary.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;sciter-sdk&#x2F;go-sciter" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sciter-sdk&#x2F;go-sciter</a>
apiover 6 years ago
An alternative is this:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;andlabs&#x2F;libui" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;andlabs&#x2F;libui</a><p>There are Go bindings here:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;andlabs&#x2F;ui" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;andlabs&#x2F;ui</a>
lucasmullensover 6 years ago
Is it worth mentioning the 5 specifically anymore? It doesn&#x27;t seem to be even using HTML5 features.
评论 #19149793 未加载
steve1977over 6 years ago
Or, don&#x27;t.
__aliasover 6 years ago
Electron is bad? Your website is bad and I don&#x27;t trust anyone with a bad website