TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

92 点作者 mariocesar超过 3 年前
I have the idea of an app that is mostly about communicating with an API on the WEB. It feels a considerable overkill for an Electron App. The size of a hello world app in Electron is 100x the size of my backend!<p>On the business side, I understand that many people on HN prefer to ship that spend time on technologies discussions.<p>But if you have the time, and your goal is to do something maintainable, reasonably close the most to the Desktop, and well-integrated to the OS, what tech&#x2F;stack will you use?<p>Windows&#x2F;Linux GTK&#x2F;MacOS

49 条评论

cedws超过 3 年前
This thread doesn&#x27;t inspire confidence. It&#x27;s mostly small and unproven projects, some maintained by hobbyists.<p>I think the mess we&#x27;re in with GUIs is because we&#x27;ve failed to find a way to convey at a very high level what the inputs and outputs of software are. In a utopian world, you&#x27;d define what you want the user to see and how the user can interact with the information. Something would then work out how to lay that for you (in a way that makes sense to a human) and construct a GUI using native OS APIs.<p>Instead, we have only three options that I&#x27;m aware of:<p>* Use a framework that ignores the native APIs, throws away the OS design language and does all the rendering inside<p>* Build separate applications for each platform<p>* Use Electron and potentially reuse work you already did on the web version<p>When looking at it this way, it&#x27;s easy to see why Electron is popular. Not that I&#x27;m a fan of it in any way.<p>I think what we need is a lot of really smart people to come together to reinvent the presentation layer.
评论 #28488505 未加载
评论 #28488184 未加载
评论 #28488842 未加载
imagine99超过 3 年前
Delphi, believe it or not. Might even be the most mature and feature-rich of any of the technologies and frameworks mentioned here.<p>RAD Studio 11 just got released and allows native development for &quot;all platforms&quot; from a single codebase and GUI at the click of a button. [0]<p>I have ranted about and harshly criticised Embarcadero&#x27;s misguided product policies as much as the next guy but that doesn&#x27;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.<p>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.<p>In the end, a native binary with a small footprint (easily 1&#x2F;100th the size of an Electron project) will fall out at the press of the F9 key and that&#x27;s really something to behold...<p>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.<p>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.<p>I like to think its versatility combined with the fact that it&#x27;s technically uncool and against the mainstream to do projects in Delphi these days might fit a hacker&#x27;s (and HN user&#x27;s) mindset very well...<p>[0] <a href="https:&#x2F;&#x2F;www.embarcadero.com" rel="nofollow">https:&#x2F;&#x2F;www.embarcadero.com</a><p>[1] <a href="https:&#x2F;&#x2F;www.embarcadero.com&#x2F;products&#x2F;delphi&#x2F;starter?aldSet=en-GB" rel="nofollow">https:&#x2F;&#x2F;www.embarcadero.com&#x2F;products&#x2F;delphi&#x2F;starter?aldSet=e...</a>
评论 #28485497 未加载
评论 #28487225 未加载
评论 #28486049 未加载
diskzero超过 3 年前
There are several options, each with their own pros and cons.<p>Qt [1]<p>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.<p>JUCE [2]<p>Another C++ framework, with Python bindings. The focus is on music and audio apps, but a cross-platform GUI framework is also part of the library.<p>Blazor Desktop [3]<p>I have developed C# web applications using Blazor and WASM and moved them to the desktop easily. Using C# and the Dotnet ecosystem is really interesing and worth looking at.<p>Flutter for Desktop [4]<p>Still in beta, but has the support of Google, for better or worse.<p>JavaFX [5]<p>A Java cross-platform still under active development. I think it is pretty nice if you like Java.<p>Red [6]<p>Let&#x27;s add an outsider just to keep things interesting!<p>This github site seems somewhat current about other Electron alternatives as well. [7]<p>Good luck! You will find there are lots of alternatives out there.<p>[1] <a href="https:&#x2F;&#x2F;www.qt.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.qt.io&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;juce.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;juce.com&#x2F;</a><p>[3] <a href="https:&#x2F;&#x2F;visualstudiomagazine.com&#x2F;articles&#x2F;2021&#x2F;02" rel="nofollow">https:&#x2F;&#x2F;visualstudiomagazine.com&#x2F;articles&#x2F;2021&#x2F;02</a> &#x2F;17&#x2F;net-6-preview-1.aspx<p>[4] <a href="https:&#x2F;&#x2F;flutter.dev&#x2F;desktop" rel="nofollow">https:&#x2F;&#x2F;flutter.dev&#x2F;desktop</a><p>[5] <a href="https:&#x2F;&#x2F;openjfx.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;openjfx.io&#x2F;</a><p>[6] <a href="https:&#x2F;&#x2F;www.red-lang.org&#x2F;p&#x2F;about.html" rel="nofollow">https:&#x2F;&#x2F;www.red-lang.org&#x2F;p&#x2F;about.html</a><p>[7] <a href="https:&#x2F;&#x2F;github.com&#x2F;sudhakar3697&#x2F;electron-alternatives" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sudhakar3697&#x2F;electron-alternatives</a>
评论 #28485302 未加载
评论 #28485641 未加载
评论 #28487132 未加载
评论 #28485208 未加载
评论 #28486298 未加载
评论 #28485383 未加载
squarefoot超过 3 年前
One word: Lazarus.<p>Cross platform done right (native code, no intepreter, no VM). Both IDE and generated code run native just about everywhere, from small ARM boards to virtual machines, and of course x86. As fast as C, decent sized executables, lots of built in or available libraries and components to do a lot of things, from managing databases to low level access to hardware, graphics, sound, etc. And of course it&#x27;s 100% FOSS.<p>My last use case was a few years ago when a friend needed to monitor some security cameras, but they were of different brands and needed either their crappy Android&#x2F;iOS app or a even more crappy XP-only ActiveX control on Internet Explorer, while he wanted to monitor them from a single screen on a Windows 7 PC. As soon as I discovered the right URL for each one to grab their video feed, I arranged a window container in Lazarus dropping there a bunch of media player components, each one linking to a camera, a few other controls and bingo, he could fire up the application and have the mutiple camera view on a monitor.<p>If it compiled more modern languages such as Nim, Rust or Crystal it would be perfect, but even by current standards Object Pascal it&#x27;s still really powerful.<p><a href="https:&#x2F;&#x2F;www.lazarus-ide.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.lazarus-ide.org&#x2F;</a><p><a href="https:&#x2F;&#x2F;wiki.lazarus.freepascal.org&#x2F;Screenshots" rel="nofollow">https:&#x2F;&#x2F;wiki.lazarus.freepascal.org&#x2F;Screenshots</a><p><a href="https:&#x2F;&#x2F;wiki.freepascal.org&#x2F;Projects_using_Free_Pascal" rel="nofollow">https:&#x2F;&#x2F;wiki.freepascal.org&#x2F;Projects_using_Free_Pascal</a><p><a href="https:&#x2F;&#x2F;www.devstructor.com&#x2F;index.php?page=tutorials" rel="nofollow">https:&#x2F;&#x2F;www.devstructor.com&#x2F;index.php?page=tutorials</a>
评论 #28486085 未加载
评论 #28488010 未加载
评论 #28490857 未加载
mintplant超过 3 年前
NodeGui [0] is an option I haven&#x27;t seen mentioned here yet. It comes in many flavors [1] [2] [3].<p>[0] <a href="https:&#x2F;&#x2F;docs.nodegui.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.nodegui.org&#x2F;</a><p>[1] <a href="https:&#x2F;&#x2F;react.nodegui.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;react.nodegui.org&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;vue.nodegui.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;vue.nodegui.org&#x2F;</a><p>[3] <a href="https:&#x2F;&#x2F;svelte.nodegui.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;svelte.nodegui.org&#x2F;</a>
rubyn00bie超过 3 年前
I&#x27;d highly suggest using Dart and Flutter.<p>I&#x27;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 &quot;good&quot; and correct. There&#x27;s some missing documentation for Desktop development with regards to Flutter + Dart but nothing is totally intractable if you&#x27;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&#x27;re paying them ~$100 million or more a year, or an EXTREMELY high profile client.<p>I&#x27;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.<p>Qt is probably fine but their licensing turns me off from ever using or considering it.
评论 #28495291 未加载
评论 #28508253 未加载
评论 #28486203 未加载
wongarsu超过 3 年前
Sciter [1] is kind of a really lightweight electron. It&#x27;s about 8Mb, cross platform, and you can either run it standalone (like electron) or use it as a library from Rust&#x2F;D&#x2F;Python&#x2F;C#&#x2F;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&#x27;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&#x27;t have (like SQLite, control over window borders, transparent windows etc).<p>1: <a href="https:&#x2F;&#x2F;sciter.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sciter.com&#x2F;</a>
arpyzo超过 3 年前
I personally like wxWidgets: <a href="https:&#x2F;&#x2F;www.wxwidgets.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.wxwidgets.org&#x2F;</a><p>It&#x27;s open source, the code has always felt reasonably clean to me, and it gives your apps native look and feel.
评论 #28485479 未加载
password4321超过 3 年前
<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=28469498#28475543" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=28469498#28475543</a><p>&gt; Free and open source: <a href="https:&#x2F;&#x2F;www.lazarus-ide.org&#x2F;index.php" rel="nofollow">https:&#x2F;&#x2F;www.lazarus-ide.org&#x2F;index.php</a><p>&gt; Other 30+ cross-platform GUI toolkits &#x2F; frameworks: <a href="https:&#x2F;&#x2F;www.slant.co&#x2F;topics&#x2F;983&#x2F;~best-cross-platform-gui-toolkits" rel="nofollow">https:&#x2F;&#x2F;www.slant.co&#x2F;topics&#x2F;983&#x2F;~best-cross-platform-gui-too...</a><p>Lazarus has the opposite problem of all the other UI toolkits - relatively awesome UI across all platforms (especially if you&#x27;re a fan of WinForms) but stuck with only support for Pascal.
mshekow超过 3 年前
I&#x27;ve successfully built apps with Python and Qt (PyQt6 and PySide6 are both working fine). The overall file size of the resulting folder is about 60-80 MB on Windows, mostly due to all the Qt DLLs&#x2F;plugins you&#x27;ll need to ship. By manually deleting non-necessary DLLs, you might save maybe up to 20 MB. Just considering the file size, this might not a huge gain compared to Electron, I suppose?<p>However, keep in mind that desktop apps have the major disadvantage of figuring out distribution (separately for each platform!!), which includes the following two steps: 1) packaging the application in some format (e.g. an MSI installer for Windows and a Disk Image Bundle for macOS), and 2) distributing that package (including auto-updates). I have written a number of articles about this topic, see <a href="https:&#x2F;&#x2F;www.augmentedmind.de&#x2F;2021&#x2F;05&#x2F;30&#x2F;distributing-windows-applications&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.augmentedmind.de&#x2F;2021&#x2F;05&#x2F;30&#x2F;distributing-windows...</a> and <a href="https:&#x2F;&#x2F;www.augmentedmind.de&#x2F;2021&#x2F;06&#x2F;13&#x2F;distributing-macos-applications&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.augmentedmind.de&#x2F;2021&#x2F;06&#x2F;13&#x2F;distributing-macos-a...</a> . You get rid of all that if you just built a PWA or other kind of web app.<p>In addition, if you use Python, you also need to choose a &quot;freezing&quot; solution, such as PyInstaller (more details at <a href="https:&#x2F;&#x2F;www.augmentedmind.de&#x2F;2021&#x2F;05&#x2F;16&#x2F;distribute-python-applications&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.augmentedmind.de&#x2F;2021&#x2F;05&#x2F;16&#x2F;distribute-python-ap...</a> ).
mynegation超过 3 年前
<a href="https:&#x2F;&#x2F;tauri.studio&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tauri.studio&#x2F;</a> - I haven’t used it myself but looks pretty interesting. They say they use existing browser engine shipped with OS and desktop integration layer written in Rust. The claim is that you get an application size under 1MB
评论 #28486360 未加载
评论 #28488026 未加载
评论 #28485583 未加载
phkahler超过 3 年前
In Solvespace we use native GUI on Windows, MacOS, and Linux (GTK). This is probably not what you want to do, as we don&#x27;t use any GUI widgets - only popup dialogs and menus. Everything in the app itself is rendered using OpenGL. Even our &quot;text window&quot; is drawn using OpenGL and GNU unifont (this is something that really needs to change BTW).<p>The platform abstraction code is here: <a href="https:&#x2F;&#x2F;github.com&#x2F;solvespace&#x2F;solvespace&#x2F;tree&#x2F;master&#x2F;src&#x2F;platform" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;solvespace&#x2F;solvespace&#x2F;tree&#x2F;master&#x2F;src&#x2F;pla...</a><p>There is no other platform specific code anywhere in the app, but like I said above we don&#x27;t support widgets.<p>There is also an emscripten port in a branch, but it doesn&#x27;t want to build recently.
评论 #28486364 未加载
评论 #28492641 未加载
graynk超过 3 年前
I am making a simple image editor for myself to use on Linux, and honestly? After looking at different bindings for Qt and GTK on Go&#x2F;Rust&#x2F;Java and looking at other GUI frameworks (all of which are in beta state, it seems) I went back to Java+JavaFX.<p>There&#x27;s a decent GUI markup editor (Scene Builder). There&#x27;s no need to manually connect your handlers from XML markup to code - you can use annotations for that. There&#x27;s HiDPI scaling that you can override if need be. There are Observable properties that you can bind to each other.<p>It&#x27;s nice! Canvas and DrawingContext are a bit of a pain to use for my specific use-case, since it draws straight to buffer with no underlying Image, but I make do for now.<p>And you can take advantage of jlink to trim your JDK to modest sizes. There are also tools like Graal Native and Liberica Native Image Kit to compile your Java app down to binary, but I haven&#x27;t toyed with those yet.<p>The cons are obvious: non-native look (you can try to style it with CSS, but there are no ready-made native looking solutions, I think, only different themes) and JVM startup time.<p>However, if you&#x27;re willing to write C++, I&#x27;d argue Qt is the best choice right now. I just refuse to touch C&#x2F;C++ with a ten-foot pole
评论 #28493513 未加载
amw-zero超过 3 年前
The trade off is always between cross-platform and native integration. For example, do you want to write an app that feels like a MacOS application? You have to use AppKit to really get that feel, and then it’s not cross platform.<p>There’s really 3 choices that I see, and have done all of them:<p>1) just build native UIs for each platform. This is the most time consuming, but the best end result in my opinion. The apps _feel_ the best on each platform<p>2) make a web app. Electron apps are still web apps.<p>3) hybrid approach, where part of your logic is shared across different native UIs, let’s say with a C++ &#x2F; Rust &#x2F; Java &#x2F; Kotlin library. This is also a spectrum. Your library can just have common glue &#x2F; networking code, all the way up to drawing its own graphics before turning a full screen over to the native UI framework.<p>I guess there’s also 4, which is Flutter, but that’s really just a pre-packaged #3.<p>If you ask me, web just has the best delivery model, and that trumps everything. Responsive web app plus a native option via Electron is the way to go.
mikewarot超过 3 年前
I&#x27;ve decided to dust off my somewhat rusty Lazarus, GIT and GitHub skills to build a Lazarus application to follow this thread using the HN API hosted by firebase.<p>You mentioned getting data to a GUI application using the web, this seemed like an ideal small project that could give you a firmer idea of just how Lazarus might fit your needs.<p>Notes:<p><i>I&#x27;ve never done anything like this (https&#x2F;json) before</i> but I suspect I&#x27;ll be done in a day or two. Once it works, I&#x27;ll then focus on getting it to also run in Ubuntu. I don&#x27;t have a Macintosh, so that&#x27;s out.<p>I&#x27;ve GPL 3.0 licensed it.<p>I&#x27;m not near the MVP yet, but it does manage to fetch the data and count the JSON objects in it for the main body of this thread.<p>With Debug info, the windows executable is 25 megabytes, without it 3.1 megabytes.<p>Here&#x27;s the github link: <a href="https:&#x2F;&#x2F;github.com&#x2F;mikewarot&#x2F;WatchHN" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mikewarot&#x2F;WatchHN</a>
评论 #28522223 未加载
occz超过 3 年前
The honest truth is that there is no good alternative here - there are only alternatives that are terrible in their own way.<p>Electron: Bloat, non-native, highly questionable language<p>Other cross-platform solutions: Obscure, (most often) non-native, undesirable language constraints, often far behind with regards to UI paradigms<p>Native UI for each platform with common code: requires deep knowledge of each platform, probably more time consuming than the other alternatives, the seam between common code and platform-specific code is often a source of errors<p>Fully separated native applications: Likely to produce the highest quality UIs, but requires the most diverse knowledge and time, more difficult to remain consistent across implementations, team size becomes an issue depending on how many platforms are supported<p>As much as I dislike Electron-applications, it&#x27;s understandable why they became adopted so widely - the alternatives are just quite simply not great.
joeld42超过 3 年前
It depends. I&#x27;ve built a lot of these. The best approach is to keep the UI very lightweight and just build it using native controls for each platform. Keep all the application logic in a common library and just rewrite the parts that are interactive. This isn&#x27;t as much work as it seems, especially if you design it upfront, and there&#x27;s no other way to get a native feel. There&#x27;s also some &quot;product management&quot; advantages to this approach, such as building new features first on your smallest platform so you can test&#x2F;iterate quickly with few users and then moving them to Windows when they are proven. Don&#x27;t build new features on all three at once, take turns.<p>If the app has a whole lot of dense UI screens, or if you don&#x27;t particularly care about it looking nice and feeling platform native, something like Qt or many of the other frameworks suggested here work well, but do be aware that you&#x27;ll be making it harder to use platform features. For example, on MacOS you wouldn&#x27;t support the TouchBar and would have some extra complexity to support Metal graphics vs GL (which Qt supports).<p>You can also do something similar to Electron but much more lightweight using a platform WebView. Then you can have common controls built in a htmlish way, and still have custom and native controls mixed in. One example of an app I worked on that was built this way and worked well was an app to browse&#x2F;view 100s of video clips, we had a common html-based widget to filter and display search results and thumbnails (which had a bunch of interesting layout requirements) but the video playback itself was in a native panel (it needed to play custom formats so using web for everything wasn&#x27;t appropriate).<p>Flutter looks promising but it still feels a little early. Try it out if you&#x27;re willing to take some risks and maybe bend your thinking a bit. I found it too indirect and felt like I had to give up too much design responsibility to the toolkit when I last tried it but maybe that&#x27;s an advantage.<p>If you&#x27;re thinking about Electron, why not make it a purely web app? Then you&#x27;ll save yourself lots of hassles distributing and downloading.<p>Also, for graphically intensive or in-house tools (like a game level editor) i use Dear ImGui, it&#x27;s very fast to develop and great cross platform support, but I wouldn&#x27;t ship it to a customer.
bleair超过 3 年前
<a href="https:&#x2F;&#x2F;www.fltk.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.fltk.org&#x2F;</a> - fast light graphics toolkit <a href="https:&#x2F;&#x2F;nanogui.readthedocs.io&#x2F;en&#x2F;latest&#x2F;" rel="nofollow">https:&#x2F;&#x2F;nanogui.readthedocs.io&#x2F;en&#x2F;latest&#x2F;</a> - nanogui
评论 #28486749 未加载
prewett超过 3 年前
As far as I am aware Qt is the only cross-platform toolkit that has reasonable traction, and it has been successfully used by commercial applications. Other cross-platform applications are either so old that there was no other choice but to write their own toolkits, or they are web browsers where you might as well write your own toolkit since you already have to do much of the work to render the HTML.<p>Unfortunately, &quot;well-integrated&quot; and &quot;cross-platform&quot; are fairly mutually exclusive, kind of by definition. I&#x27;m not sure if the API model for Windows and macOS even have a generalizeable common model. (They might, they might not, I&#x27;ve not investigated, and it would depend on which of the many MS UI APIs you are using)
ppetty超过 3 年前
So just for the sake of completeness, maybe, and since Electron seems to be the most popular solution; what about a website? Fairly ubiquitous across all platforms with the help of Chrome, Firefox, and even Safari or Edge. I don’t think should be dismissed as often as is, consider VS Code on Github.com (hit the period key in a repo and the repo’s code is presented with VS Code in a browser — and it supports syncing extensions — though not all, for example).<p>To me it makes sense from tne perspective of the work being done in HTML, CSS &amp; JS to make an Electron app. Why not start as a website then desktop?<p>I get there are certain pieces of functionality not suited for a website; but based on the original post’s question and description it seems feasible.
评论 #28486177 未加载
antender超过 3 年前
There is also an interesting solution to this problem: use native WebView, so you don&#x27;t have to pack the whole Chrome with your app. Basically every &quot;electron alternative&quot; with HTML+CSS+JS works this way.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;sudhakar3697&#x2F;electron-alternatives" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sudhakar3697&#x2F;electron-alternatives</a>
评论 #28485409 未加载
jamil7超过 3 年前
It’s too early to judge but Jetbrains are working on a desktop implementation of Jetpack Compose, the new Android UI framework. It draws to skia like Flutter so also not really “native” if that’s important to you. <a href="https:&#x2F;&#x2F;www.jetbrains.com&#x2F;lp&#x2F;compose&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.jetbrains.com&#x2F;lp&#x2F;compose&#x2F;</a>
pengo超过 3 年前
We write apps like this in Object Pascal using Lazarus. Think Delphi but open source.<p>We have a suite of framework-specific developer apps for tasks like packaging deployments, managing common database tasks, onboarding new clients etc. They were written on Linux using Lazarus, then recompiled on MacOS and Windows as required. There are occasionally OS-specific variations for small pieces of these apps, but Object Pascal has inline compiler switches to make this easy to manage.
评论 #28489116 未加载
vorpalhex超过 3 年前
I recently built one using Fyne for golang. It works well for my case but Fyne is still very new and in development.<p><a href="http:&#x2F;&#x2F;fyne.io&#x2F;" rel="nofollow">http:&#x2F;&#x2F;fyne.io&#x2F;</a>
samf超过 3 年前
I haven&#x27;t used this, but it should be mentioned:<p><a href="https:&#x2F;&#x2F;tauri.studio&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tauri.studio&#x2F;</a>
unnouinceput超过 3 年前
I use Delphi with its FireMonkey framework. It targets all major operating systems (Win&#x2F;Lin&#x2F;Mac&#x2F;Droid&#x2F;iOS) natively. From all the cross-platform frameworks that I&#x27;ve seen in 25+ years of working in the industry Delphi&#x27;s switching target is the easiest - a simple combobox and kaboom!, you&#x27;re good to deploy for that OS.<p>Their roadmap include, in some years I suspect, probably 5, to also target WASM at which point, if Embarcadero is smart enough to lower their ridiculous license pricing to under $300, will become the most powerful tool to write cross-platform applications.
yellowapple超过 3 年前
I&#x27;ve had decent experiences with Python and Qt5. Windows was historically the painful part, but FBS¹ makes that a lot less painful nowadays. Tk also works reasonably well if you don&#x27;t need the features and native integration that Qt offers (and I&#x27;m pretty sure FBS can handle Tkinter apps just fine).<p>The .NET ecosystem is another solid choice for cross-platform desktop app development (and nowadays even mobile, too). Avalonia² in particular looks promising, and is probably what I&#x27;d try using first should I ever be tasked with developing a desktop app again.<p>EDIT: Also, since you mentioned it already for Linux, GTK works well enough on Windows and (IIRC) macOS, too.<p>----<p>¹: <a href="https:&#x2F;&#x2F;build-system.fman.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;build-system.fman.io&#x2F;</a><p>²: <a href="https:&#x2F;&#x2F;avaloniaui.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;avaloniaui.net&#x2F;</a>
评论 #28490495 未加载
marczellm超过 3 年前
We&#x27;ve test driven UNO at our company <a href="https:&#x2F;&#x2F;platform.uno&#x2F;" rel="nofollow">https:&#x2F;&#x2F;platform.uno&#x2F;</a> but you really have to stick to the beaten path as some more complex controls are only partly implemented. It&#x27;s a variation on Xamarin basically.
superjan超过 3 年前
There’s also Xamarin. Uses C# and dotnet. You can choose between native widgets and platform-agnostic.<p><a href="https:&#x2F;&#x2F;dotnet.microsoft.com&#x2F;apps&#x2F;xamarin" rel="nofollow">https:&#x2F;&#x2F;dotnet.microsoft.com&#x2F;apps&#x2F;xamarin</a>
xvedejas超过 3 年前
I&#x27;m not the best person to explain or recommend it, but I&#x27;ll suggest &quot;immediate mode&quot; GUIs partially because I want to hear more about the pros&#x2F;cons from those more experienced (I haven&#x27;t ever worked on UIs professionally). It seems these graphics libraries just need some kind of context to draw to, like from OpenGL, and also have a simpler implementation in general. That might make them more portable and smaller, if less native-feeling. I just started looking into egui (a Rust crate) myself.
评论 #28485737 未加载
Fizzadar超过 3 年前
There&#x27;s pywebview (<a href="https:&#x2F;&#x2F;github.com&#x2F;r0x0r&#x2F;pywebview&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;r0x0r&#x2F;pywebview&#x2F;</a>) which is a Python lib that uses whatever native webview implementation exists. Obviously means some compatibility work between each OS, but gives out very small apps what work very well on the whole. I&#x27;m using it on my cross platform email client (<a href="https:&#x2F;&#x2F;kanmail.io" rel="nofollow">https:&#x2F;&#x2F;kanmail.io</a>).
cosmotic超过 3 年前
Java and Swing are still a great option.
评论 #28488521 未加载
评论 #28488056 未加载
verdverm超过 3 年前
QT <a href="https:&#x2F;&#x2F;www.qt.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.qt.io&#x2F;</a> is one option I know of. There might be some Python or Golang libraries?
mjevans超过 3 年前
It would be really nice if there was a shared widget API that would work for the major operating systems. If most of simple app could work on Windows, OSX, maybe mobile (Android &#x2F; iOS) and Linux &#x2F; BSD.<p>Something that was mostly native for all of them.<p>Currently the only alternative to Electron that is similar is a program that hosts a local webserver and the local browser is pointed at it, but that&#x27;s a second class experience.
评论 #28488776 未加载
评论 #28488766 未加载
sircastor超过 3 年前
At my work a few years back, we did quite a lot of prototyping using Qt, QML and JavaScript. It can get you surprisingly far for a GUI. It’s probably not the “right” way to do it, and Qts approach to QML is that it’s for UI. It app logic, but it’ll work in a pinch and it’s pretty easy to pickup.<p>That said, QML and QtPython sound like a really great combo
alphaomegacode超过 3 年前
Is there a particular language that you needed to use or have skills in? That&#x27;s a very important qualifier.
评论 #28484808 未加载
teebee超过 3 年前
You probably are wasting your time - multi-billion dollar companies have abandoned native desktop development - pretty sure they decided it was just easier and cheaper to maintain. If you are doing this for fun or profit - you need to decide how much your time is worth.
Lammy超过 3 年前
libui has bindings for many languages but might be too immature for complex needs <a href="https:&#x2F;&#x2F;github.com&#x2F;andlabs&#x2F;libui" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;andlabs&#x2F;libui</a>
accountofme超过 3 年前
In used to work for a company that modified an opengl c++ game engine to act as a cross platform 2d GUI.<p>It worked but the amount of effort is not worth it for most organisations.
karmakaze超过 3 年前
Is the Eclipse RCP still a reasonable platform? Not as fancy as JavaFX but must be more mature&#x2F;feature-complete. Similarly for the NetBeans kit.
rcarr超过 3 年前
Tauri looks promising if you can code Rust
enduku超过 3 年前
Give Sciter a chance.<p><a href="https:&#x2F;&#x2F;sciter.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sciter.com&#x2F;</a>
smoldesu超过 3 年前
I&#x27;ll get shot for suggesting this most places, but I feel like GTK has the most &#x27;native&#x27; feel across every operating system. That&#x27;s not to say that it&#x27;s easy to get working (setting up proper build targets is going to be your biggest hurdle), but your reward is a stylish and robust UI with proper touchscreen support on Windows&#x2F;Linux.
评论 #28485243 未加载
评论 #28485615 未加载
评论 #28488353 未加载
kody超过 3 年前
Qt&#x2F;QML is my choice.
waspight超过 3 年前
Does anyone really care about the size of the program anyway?
ofou超过 3 年前
any good open source one?
评论 #28485971 未加载
p0nce超过 3 年前
Qt, GTK, SDL, Flutter...
billconan超过 3 年前
imgui
slater超过 3 年前
QT?