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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: What's the best library for making cross-platform UIs?

223 点作者 rer超过 8 年前

58 条评论

dahart超过 8 年前
It would help a lot to have the question elaborate on what you really need. What do you mean by &quot;best&quot;, and do you actually need the best? Do you need easy to learn, or code that is easy to deliver, or most powerful features, or most number of platforms covered? Do you include mobile in cross platform, and do you have a performance or language requirement?<p>A web app is one of the most cross platform ways to go, is the easiest to deliver, and can be easy-ish to learn, but isn&#x27;t the easiest. But, you are stuck with JavaScript. If a web app won&#x27;t work for you, why not? Knowing that will allow people to help you more.<p>Qt is great, especially if you&#x27;re using C++ or some other language. It&#x27;s pleasant and very powerful, but a lot to learn, and deployment to users is harder than a web app.<p>What are your constraints &amp; requirements?
评论 #12379603 未加载
评论 #12380428 未加载
babuskov超过 8 年前
Strange nobody mentioned wxWidgets so far which gives you true native apps, so I&#x27;ll do it:<p><a href="http:&#x2F;&#x2F;wxwidgets.org" rel="nofollow">http:&#x2F;&#x2F;wxwidgets.org</a><p>It provides API layer which compiles to Win32 API on Windows, Gtk2 on Linux and Carbon&#x2F;Cocoa on Mac OSX.<p>Qt only emulates Windows controls, but wxWidgets uses the actual Windows controls via Microsoft Win32 API.<p>BTW, there&#x27;s wxQt, a wxWidgets implementation that uses Qt instead of Gtk, but it&#x27;s still experimental:<p><a href="https:&#x2F;&#x2F;wiki.wxwidgets.org&#x2F;WxQt" rel="nofollow">https:&#x2F;&#x2F;wiki.wxwidgets.org&#x2F;WxQt</a><p>wxWidgets has been used by some popular projects like Audacity, TortoiseCVS, RapidSVN, FileZilla, BitTorrent, etc.<p>Another wxWidgets advantage over Qt is the license, which gives you more freedom.<p>If you&#x27;re looking for a faster start, take a look at wxFormBuilder which is a graphical WYSIWYG UI editor where you can drop controls in windows&#x2F;dialogs and hook up event handlers.<p>You can find links to more related tools&#x2F;IDEs on the Wikipedia page:<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;WxWidgets" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;WxWidgets</a>
评论 #12376849 未加载
评论 #12379994 未加载
评论 #12378088 未加载
评论 #12377635 未加载
评论 #12377521 未加载
networked超过 8 年前
What is the best depends on your exact requirements but three good options to get a GUI off the ground quickly are Tk [1], wxWidgets (and wxPython [2] and wxLua [3] in particular) and Lazarus (LCL) [4].<p>Tk widgets look native on Windows and macOS (if you use the right ones — see [5]), though their behavior is implemented by Tk itself. On Linux it draws its own widgets in several styles; GTK and Qt theme support is immature. Lazarus and wxWidgets use native widgets on Windows and macOS. Both can use GTK2 on Linux but Lazarus also supports GTK1 and Qt.<p>If I had to deliver a cross-platform desktop GUI application by midnight today, I would go with Tk, write the code in Tcl (which necessarily has the best Tk integration) and package it in a static binary Starpack [6].<p>[1] <a href="http:&#x2F;&#x2F;www.tkdocs.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.tkdocs.com&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;wxpython.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;wxpython.org&#x2F;</a><p>[3] <a href="http:&#x2F;&#x2F;wxlua.sourceforge.net&#x2F;" rel="nofollow">http:&#x2F;&#x2F;wxlua.sourceforge.net&#x2F;</a><p>[4] <a href="http:&#x2F;&#x2F;www.lazarus-ide.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.lazarus-ide.org&#x2F;</a>, <a href="http:&#x2F;&#x2F;wiki.lazarus.freepascal.org&#x2F;LCL" rel="nofollow">http:&#x2F;&#x2F;wiki.lazarus.freepascal.org&#x2F;LCL</a><p>[5] <a href="http:&#x2F;&#x2F;www.tkdocs.com&#x2F;tutorial&#x2F;idle.html" rel="nofollow">http:&#x2F;&#x2F;www.tkdocs.com&#x2F;tutorial&#x2F;idle.html</a><p>[6] <a href="https:&#x2F;&#x2F;tcl.wiki&#x2F;Starpack" rel="nofollow">https:&#x2F;&#x2F;tcl.wiki&#x2F;Starpack</a>
评论 #12377413 未加载
评论 #12379122 未加载
edtechdev超过 8 年前
React Native supports<p>* iOS<p>* Android<p>* OS X <a href="https:&#x2F;&#x2F;github.com&#x2F;ptmt&#x2F;react-native-macos" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ptmt&#x2F;react-native-macos</a><p>* Windows <a href="https:&#x2F;&#x2F;github.com&#x2F;ReactWindows&#x2F;react-native-windows" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ReactWindows&#x2F;react-native-windows</a><p>* Ubuntu <a href="https:&#x2F;&#x2F;developer.ubuntu.com&#x2F;en&#x2F;blog&#x2F;2016&#x2F;08&#x2F;05&#x2F;introducing-react-native-ubuntu&#x2F;" rel="nofollow">https:&#x2F;&#x2F;developer.ubuntu.com&#x2F;en&#x2F;blog&#x2F;2016&#x2F;08&#x2F;05&#x2F;introducing-...</a><p>* the web <a href="https:&#x2F;&#x2F;github.com&#x2F;necolas&#x2F;react-native-web" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;necolas&#x2F;react-native-web</a>
评论 #12377621 未加载
scrollaway超过 8 年前
Qt has a truly pleasant API and bindings in many languages. If you haven&#x27;t used it before - and I know you haven&#x27;t, otherwise you wouldn&#x27;t be asking :) - give it a try. There&#x27;s very little that&#x27;s more cross-platform.
评论 #12376685 未加载
评论 #12376443 未加载
评论 #12377076 未加载
评论 #12376754 未加载
评论 #12379000 未加载
评论 #12378504 未加载
fitzwatermellow超过 8 年前
Just getting started on Electron myself. Used by Atom, Slack, Visual Studio... It&#x27;s worth a look ;)<p>Electron - Build Cross-Platform Desktop Apps With HTML, JS, CSS<p><a href="http:&#x2F;&#x2F;electron.atom.io&#x2F;" rel="nofollow">http:&#x2F;&#x2F;electron.atom.io&#x2F;</a>
评论 #12376567 未加载
评论 #12377005 未加载
评论 #12387773 未加载
评论 #12378583 未加载
评论 #12377309 未加载
knabacks超过 8 年前
There are plenty of options (all biased by personal opinion) for this task. Maybe one of these projects is a good fit for you (creating consistent uis should be easy with all of these).<p>- <a href="https:&#x2F;&#x2F;crosswalk-project.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;crosswalk-project.org&#x2F;</a><p>- <a href="https:&#x2F;&#x2F;cordova.apache.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cordova.apache.org&#x2F;</a><p>- <a href="https:&#x2F;&#x2F;kivy.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;kivy.org&#x2F;</a><p>- <a href="https:&#x2F;&#x2F;www.nativescript.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.nativescript.org&#x2F;</a><p>- <a href="https:&#x2F;&#x2F;www.xamarin.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.xamarin.com&#x2F;</a><p>- <a href="https:&#x2F;&#x2F;facebook.github.io&#x2F;react-native&#x2F;" rel="nofollow">https:&#x2F;&#x2F;facebook.github.io&#x2F;react-native&#x2F;</a><p>#<p>- <a href="https:&#x2F;&#x2F;www.wxwidgets.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.wxwidgets.org&#x2F;</a><p>- <a href="http:&#x2F;&#x2F;nwjs.io&#x2F;" rel="nofollow">http:&#x2F;&#x2F;nwjs.io&#x2F;</a><p>- <a href="http:&#x2F;&#x2F;electron.atom.io&#x2F;" rel="nofollow">http:&#x2F;&#x2F;electron.atom.io&#x2F;</a>
edko超过 8 年前
&quot;The best&quot; is subjective. I have played around with libui (<a href="https:&#x2F;&#x2F;github.com&#x2F;andlabs&#x2F;libui" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;andlabs&#x2F;libui</a>), which runs on Windows, Linux, and macOS. A nice thing about it is that it is written in C, and therefore has bindings with several programming languages. I have experimented using it from Java (via JNA) and it works quite nicely.
评论 #12383058 未加载
评论 #12378811 未加载
rer超过 8 年前
Here&#x27;s what I want.<p>- The UI to look as good or better than the UI on Mac OS X. I&#x27;m not willing to compromise on looks.<p>- The library to be cross-platform. I want to deploy the software on Mac OS X, Windows, and Linux. I don&#x27;t care about mobile right now.<p>- I want it to be possible and easy to (a) develop new features on my own and (b) change existing features. I&#x27;d rather reimplement a textbox from scratch if it&#x27;s the only way to change a control. If this means I need something more like GLib instead of GTK+, so be it.<p>- I won&#x27;t use the web. No HTML, no CSS, no Javascript. Sorry.<p>The end goal is to build the best, easiest UI environment to write software with. If it&#x27;s not possible to build this with existing UIs and I have to write one from scratch, so be it.
评论 #12378555 未加载
评论 #12378767 未加载
评论 #12378786 未加载
评论 #12378762 未加载
评论 #12379019 未加载
doozy超过 8 年前
None, abstract the functionality of your app into a cross-platform library and build a native GUI for each platform you support using that platform&#x27;s native SDK.
评论 #12377916 未加载
评论 #12378649 未加载
open-source-ux超过 8 年前
Take a look at Free Pascal and the Lazarus IDE.<p>What is a Lazarus? From their website:<p>&quot;<i>...a cross-platform IDE for Rapid Application Development. It has variety of components ready for use and a graphical form designer to easily create complex graphical user interfaces.</i>&quot;<p>Why use Lazarus and Free Pascal? You can create native, cross-platform UI&#x27;s all combined into a single, fast, low-memory executable that can easily be deployed and distributed on different platforms.<p><a href="http:&#x2F;&#x2F;www.lazarus-ide.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.lazarus-ide.org&#x2F;</a>
gwbas1c超过 8 年前
I work on a cross-platform application that runs on both Windows and Mac.<p>We have a cross-platform library for business logic, and native Windows and Mac UIs.<p>The problem is that cross-platform UI libraries don&#x27;t really let you fine-tune the UI. They&#x27;re great for very rapid development with a basic, functional, UI.<p>If you get an &quot;artiste&quot; in product management, or you need to plug into Windows-specific and Mac-specific functionalities, you will need to use platform-specific UI libraries and keep your business logic platform-neutral.
评论 #12378604 未加载
anmorgan超过 8 年前
I&#x27;ve recently been using Crank Storyboard and I&#x27;ve been off to a good start. You can run it on embedded devices like ARM Cortex-M series processors, or Linux, iOS, Android, Windows, with openGL support. It does require a license though.<p><a href="http:&#x2F;&#x2F;cranksoftware.com&#x2F;storyboard-suite" rel="nofollow">http:&#x2F;&#x2F;cranksoftware.com&#x2F;storyboard-suite</a><p>Also someone else mentioned Phonegap and using HTML&#x2F;JS. I think is a good option but it depends on what your app does and if you&#x27;re doing mobile app design.<p>I have not used QT yet, but after doing some research, it&#x27;s kind of a pick your poison type of choice, IMO.
tyfon超过 8 年前
I have tried many but always turn back to qt. It has bindings for whatever language, compiles for any platform and the documentation is superb.
mushiake超过 8 年前
IUP[0] has not been menthioned.<p>IUP is wrapper for gtk+, motif and win32.<p>Pros:<p>* really simple api<p>* native toolkit<p>* c api, so other languages can easily write binding for it<p>Cons:<p>* controlls(widgets) are limited<p>* cocoa(mac) is not supported {they suggest to use gtk instead}<p>* documentation is spotty<p>* nobody is using? (I believe no linux distros have it in repository)<p>somebody here menthioned libui[1], it is exactlly the same philosophy<p>[0]<a href="http:&#x2F;&#x2F;webserver2.tecgraf.puc-rio.br&#x2F;iup&#x2F;" rel="nofollow">http:&#x2F;&#x2F;webserver2.tecgraf.puc-rio.br&#x2F;iup&#x2F;</a> [1]<a href="https:&#x2F;&#x2F;github.com&#x2F;andlabs&#x2F;libui" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;andlabs&#x2F;libui</a>
评论 #12379096 未加载
antonios超过 8 年前
If you don&#x27;t want a _native_ GUI, you can go the Electron way. This way you&#x27;ll have a fully cross-platform application with minimum hassle.<p>If you want a native one, probably Qt is the winner here.
zackify超过 8 年前
React (Native). You can build an iOS and android app with the same codebase. Even windows phone and ubuntu are starting to support it. Then when you want to use the web, your whole data layer can carry over to reactjs. It&#x27;s a really nice way of doing things. There&#x27;s even react native for Mac OS that someone has started.
评论 #12376472 未加载
mherrmann超过 8 年前
For a file manager I&#x27;m developing [1], this question recently boiled down to Electron vs (Py)Qt. I chose (Py)Qt because Electron&#x27;s startup speed is too slow.<p>[1]: <a href="https:&#x2F;&#x2F;fman.io" rel="nofollow">https:&#x2F;&#x2F;fman.io</a>
评论 #12378659 未加载
jlarocco超过 8 年前
It depends on what language you&#x27;re using and your requirements, but my preference is Qt. It has bindings to several languages; it supports most common platforms; the API is consistent, stable, and well documented; and it&#x27;s easy to get up and running on all of the platforms it supports.<p>One complaint people have about Qt is that it doesn&#x27;t &quot;look native&quot; enough. That&#x27;s not something I personally care about, and it&#x27;s not a problem at all for the applications I write, but it&#x27;s an issue for some people. IME, that&#x27;s just a trade off of using a cross-platform GUI library. If the layout is good and it&#x27;s easy to use, most people won&#x27;t care if it doesn&#x27;t look native. Photoshop doesn&#x27;t &quot;look native&quot; either, yet it has a huge following and brings in a ton of money.
levbrie超过 8 年前
My vote is for electron, although I&#x27;m following how React Native develops really closely. From what I&#x27;ve seen, the best new &quot;Desktop&quot; apps tend to be built with electron. We&#x27;ve been using it in production and, despite having to make pull requests for framework-level bugs fairly regularly, we&#x27;ve haad a pretty good experience overall, and far better than anything else we&#x27;ve tried - although, as I said, we have yet to seriously look into React Native. Also, by cross-platform I&#x27;m assuming you mean OS X, Windows, and Linux. If you also want to include mobile, then there are so few options there&#x27;s no longer any real reason to debate.
SeaDude超过 8 年前
I&#x27;m barely a geek, let alone a hacker, but have been trying to learn NativeScript for the past month or so. You might want to check it out.<p>Not sure how it compares as a &quot;library&quot; or &quot;framework&quot; etc. I&#x27;m still figuring out where the lines are drawn.<p><a href="http:&#x2F;&#x2F;docs.nativescript.org" rel="nofollow">http:&#x2F;&#x2F;docs.nativescript.org</a> Emulator Here: <a href="https:&#x2F;&#x2F;docs.genymotion.com" rel="nofollow">https:&#x2F;&#x2F;docs.genymotion.com</a>
评论 #12378638 未加载
melle超过 8 年前
Depending on the type of UI, you could also give Kivy a try. <a href="https:&#x2F;&#x2F;kivy.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;kivy.org&#x2F;</a><p>It&#x27;s python based, and really easy to get going. It does have it&#x27;s quirks, but overall I found it a joy to use.
评论 #12376410 未加载
tariqrauf超过 8 年前
Depends on what you&#x27;re after :)<p>Electron or QT for cross-desktop apps, Angular &amp; Ion framework for cross-mobile apps, React &amp; React-native for cross-mobile apps
评论 #12377103 未加载
tumdum_超过 8 年前
There is also swing and javafx if you want to use jvm.
评论 #12376468 未加载
评论 #12377670 未加载
agentultra超过 8 年前
It depends on what you mean by, &quot;cross-platform.&quot; In my world there is no such thing. You pick your target platforms and program to them. However it is common to imply &quot;major platforms&quot; (ie: <i>iOS</i>, <i>Android</i>, <i>Windows 10</i>, <i>OSX</i>). Different platforms have different requirements and will shape your solution.<p>Next... what is the application? Do you need to target native APIs? Do you have memory limitations?<p>If you don&#x27;t mind taking up a lot of memory try one of the &quot;cross platform&quot; systems like Xamarin or some Java-based solution. If you need to be more constrained try writing to the native APIs and porting your project to each target platform you need to target. Lastly if you&#x27;re highly constrained maybe you need to try an immediate-mode style library like Nuklear[0].<p>It really depends on your needs. There&#x27;s no one-size-fits-all.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;vurtun&#x2F;nuklear" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;vurtun&#x2F;nuklear</a>
评论 #12378672 未加载
tylerlarson超过 8 年前
A few other people have mentioned JavaScript and HTML but in my experience HTML and CSS support varies wildly between platforms and as applications become larger it is difficult to tune the performance of your running application. Also the implementation of the base code for HTML tags and what CSS properties can do are inaccessible to JavaScript making many task much harder than they would be in other environments where you can simply extend or introspect the internals.<p>But if you want something to run everywhere including web browsers, JavaScript is the only realistic option. So we make do. My current approach is to rely on HTML&#x2F;CSS and React&#x2F;React Native for the easy stuff and everything else is rendered in the Canvas tag with lots of JavaScript to bend the platforms into doing what you want.<p>In the past I have taken similar approaches by using things like Ejecta but the android support for this is lacking and now that WKWebView has addressed many of its issues, using standard WebViews within native containers is fast enough on mobile.<p>On desktop, Electron, NW or the other things like this can fulfill the same setup.<p>People will complain about performance which was a really big issues a few years ago but today the difference isn&#x27;t large enough that it can&#x27;t be worked around and most of the fear is in people heads. Most environments have web workers, and webgl, and JavaScript that has a JIT, and many new things like Web Assembly and SIMD should be available in the coming years making these platforms even more viable.
shireboy超过 8 年前
Not a library per se, but HTML+CSS+JS. Bootstrap or some other mobile responsive framework. Works on just about every device&amp;OS. Phone gap or similar if you really need native.
评论 #12376390 未加载
antoineMoPa超过 8 年前
GTK may have a difficult API, but it is portable and it gives a better feel than Qt for Linux+Gnome users like me (I will always choose a GTK app over a Qt app).
评论 #12377683 未加载
评论 #12377944 未加载
SyneRyder超过 8 年前
I&#x27;ll throw in a mention for Xojo:<p><a href="http:&#x2F;&#x2F;www.xojo.com" rel="nofollow">http:&#x2F;&#x2F;www.xojo.com</a><p>Xojo used to be called REALbasic, and it&#x27;s a cross-platform &#x27;Visual Basic&#x27; with support for Windows, Mac, Linux, iOS and Raspberry Pi. I tend to use it for internal tools that need to run on both Windows &amp; Mac, and find it&#x27;s great for getting to a prototype stage very quickly.
评论 #12378741 未加载
Sir_Cmpwn超过 8 年前
I like Xwt: <a href="https:&#x2F;&#x2F;github.com&#x2F;mono&#x2F;xwt" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mono&#x2F;xwt</a><p>Used it for the TrueCraft launcher: <a href="https:&#x2F;&#x2F;github.com&#x2F;SirCmpwn&#x2F;TrueCraft&#x2F;tree&#x2F;master&#x2F;TrueCraft.Launcher" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;SirCmpwn&#x2F;TrueCraft&#x2F;tree&#x2F;master&#x2F;TrueCraft....</a>
pipio21超过 8 年前
It depends on what you need.<p>In the past we used GTK and wxwidgets with OpenGL but we did not like it.<p>We started using Qt, much better(proper object oriented by design, and cleaner design than wxwidgets) and web apps. Now we use native libs with our own multiplattform lib with bindings for each plattform:<p>-javascript for the web.<p>-native cocoa and windows libs, with openGL, metal and directX.<p>-Qt for linux with OpenGL.<p>- Native mac(iOS and cocoa) and windows.
heavenlyhash超过 8 年前
There&#x27;s a lot of great web-tech based solutions. Other commentors are covering those, so I&#x27;ll suggest something different: For a take outside of the web, Golang with OpenGL bindings has a lot of promise for shipping $everywhere.<p>The <a href="https:&#x2F;&#x2F;github.com&#x2F;go-gl" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;go-gl</a> github org has repos with comprehensive pre-generated OpenGL linking. When building off these, you need almost zero interaction with any host libraries. Cross compiling is a <i>breeze</i>. I made a demo application on Linux one afternoon to try it out: I was able to hand the code to a friend with a Mac, and he compiled and ran it <i>first try</i>. It&#x27;s hard to understate the level of &quot;wow&quot; there.<p>Golang+GL also ships to mobile devices. There&#x27;s a little squeeze dealing with the app stores, but fundamentally, build on GLES2 and you can go anywhere.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;gxui&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;gxui&#x2F;</a> is one library on top of these foundations that went all the way to providing (<i>beautiful!</i>) cross-platform widgets that can be used to quickly build a desktop application.<p>Unfortunately, gxui, though a very attractive proof of concept, is now unmaintained. (At the same time, it&#x27;s worth mentioning that <i>it still works</i>; there&#x27;s no insane deprecation schedule or fast-moving&#x2F;fast-breaking libraries to wreck your day here.) If anyone Out There is interested in renewing this project or starting more frameworks like this, I&#x27;d love to collaborate.<p>Overall, there&#x27;s work to do here, but if you have some appetite for cutting edge, the foundation is in place to nail portability properly.<p>Finally, this is unrelated, but I feel compelled to give an anti-pitch to pretty much everything in C&#x2F;C++ ecosystem of GUI tools: it&#x27;s a landscape of last decade&#x27;s promises, and today&#x27;s despair. I&#x27;ve had comrades complain bitterly over time they&#x27;ve spent in codebases where the wxwidget string objects got out of hand. I have a half dozen applications suffering from various C++ linker hells on my various computers and can&#x27;t recommend QT with a straight face. I <i>still</i> haven&#x27;t gotten all my gtk3 and gtk2 configs to line up on my last debian reinstall and all the font sizes are fragged on the computer for no known reason (I literally the gtk configs in my dotfiles in git; I can&#x27;t imagine how different machines drift)... And I haven&#x27;t even said a word about build and shipping infrastructure required to really tackle cross-platform. I&#x27;ll say it again: <i>the entire C&#x2F;C++ ecosystem of GUI tools is a landscape of despair</i>.
c-smile超过 8 年前
<a href="http:&#x2F;&#x2F;sciter.com" rel="nofollow">http:&#x2F;&#x2F;sciter.com</a><p>Embeddable HTML&#x2F;CSS UI engine designed specifically for desktop UIs.<p>The &quot;Embeddable&quot; here means that: - it is a compact (3...4mb) monolithic DLL&#x2F;dylib&#x2F;so without external dependencies. - can be linked statically if needed. - has simple plain C API of 20-30 functions - C++,C#,Rust,Go,Delphi,Python wrappers.<p>Same UI resources are used on all platforms: <a href="http:&#x2F;&#x2F;sciter.com&#x2F;images&#x2F;sciter-clock.png" rel="nofollow">http:&#x2F;&#x2F;sciter.com&#x2F;images&#x2F;sciter-clock.png</a><p>Check technology introduction article:<p><a href="http:&#x2F;&#x2F;www.codeproject.com&#x2F;Articles&#x2F;859098&#x2F;Sciter-multiplatform-embeddable-HTML-CSS-scripting" rel="nofollow">http:&#x2F;&#x2F;www.codeproject.com&#x2F;Articles&#x2F;859098&#x2F;Sciter-multiplatf...</a>
TheGrassyKnoll超过 8 年前
Which one has the best tutorial so a wanna-be can get started ? Usually, to me, the &#x27;best&#x27; tutorials have the most examples. (Yes, an example is worth a thousand words) (I&#x27;d want to be starting on Ubuntu, with Python 3)
justsaysmthng超过 8 年前
The choice of the UI library depends a lot on the type of app you&#x27;re developing. For many types of apps, a single page HTML&#x2F;JS&#x2F;CSS app bundled as an executable is the best choice.<p>If your app will do a lot with the hardware (sound, video, networking,...), then you should look at native libraries for cross-platform hardware access and UI (though HTML&#x2F;JS&#x2F;CSS based UIs with native core are also possible).<p>In my experience, making a good &quot;cross-platform&quot; UI can be tricky, especially if your platforms include both desktop and mobile.<p>The reason is that each platform has it&#x27;s own set of features, limitations and design requirements, which you either have to emulate, ignore or implement as platform-specific modules.<p>Most UI libraries implement their own windowing systems which makes it possible to have an app that behaves similarly on all platforms.<p>The drawback is that the app looks and feels &#x27;cooked&#x27; - things aren&#x27;t quite standard, animations are a bit off, fonts are rendered differently, etc.<p>One such example is Qt, which has been mentioned many times here. It is probably the best choice if pixel perfection and native look&#x2F;feel isn&#x27;t your primary requirement. With a bit of work you could probably achieve native &#x27;perfection&#x27; with it too.<p>If you work with sound, then you should take a good look at JUCE - it has a very pleasant API, has a low overhead and a very friendly community.<p>That being said, the best choice IMHO is to develop native UIs for each platform or at least for the mobile versions of your app.<p>The trick is to separate your design into &quot;core&quot; and &quot;ui&quot; parts. The core is a cross platform C++ library, which implements all the business logic and low level hardware access, exposing an API to the UI layer.<p>The UI is then implemented in Qt&#x2F;JUCE for the desktop apps, Objective-C++ and Swift for iOS (and OSX if you want) and Java+JNI on Android.<p>The advantage of this method is that it forces you to have clear separation of concerns between the core business and UI layers and you can have different people working on the core and the specific platform UIs.<p>The ultimate advantage is of course your user&#x27;s experience - native apps are more gratifying.<p>It might sound like a lot more work, but it&#x27;s usually not as bad as it sounds - if you have a well designed core API, the UI is just a visual representation of your application state, which is not that difficult to implement on each platform.<p>In the end, personal preference and tastes also matter - use whatever makes you (and your team) feel more comfortable. Good luck !
EGreg超过 8 年前
I&#x27;m just going to come out and say The Web. Stick WebViews in your app and if you need some native API use a bridge (like PhoneGap).<p>By itself you can already have tons and tons of great UI components that work cross platform.<p>But if you want a web based library specifically designed to present a common interface tailored to each device (desktop, tablet and mobile) and taking advantage of its unique characteristics, use our open source one:<p><a href="http:&#x2F;&#x2F;qbix.com&#x2F;platform" rel="nofollow">http:&#x2F;&#x2F;qbix.com&#x2F;platform</a>
评论 #12377753 未加载
maramono超过 8 年前
Here&#x27;s what I use to develop Mutator&#x27;s [0] and TestLess&#x27; [1] GUIs: - implement in Ruby - compile to Java using Warbler&#x2F;JRuby - Run as Java on any platform that supports Java.<p>You can use javafx or swing, although javafx needs certain combination of warbler and jruby to work.<p>[0] <a href="http:&#x2F;&#x2F;ortask.com&#x2F;mutator&#x2F;" rel="nofollow">http:&#x2F;&#x2F;ortask.com&#x2F;mutator&#x2F;</a><p>[1] <a href="http:&#x2F;&#x2F;ortask.com&#x2F;testless&#x2F;" rel="nofollow">http:&#x2F;&#x2F;ortask.com&#x2F;testless&#x2F;</a>
SimianLogic2超过 8 年前
I&#x27;ve been going the other direction recently. We have a photoshop plugin that exports layers with metadata (where an image is located, fonts, font sizes, text, etc). For any platform that has a basic scene graph and some sort of label functionality (Unity, iOS, android, theoretically even web) we write a runtime that converts the metadata into runtime UIs.<p>So it ends up being custom logic for interaction on each platform, but the design&#x2F;assets can be shared cross-platform.
jbergens超过 8 年前
You might have to define which platforms you want or need to target. There is a difference between just writing a desktop application that should work on Windows and Mac, an app that should work on iPhone and Android and a solution that needs to work on all of the above plus Linux desktops and Windows Phones and web browsers. [edit: spelling]
jasonjei超过 8 年前
You can have your cake and eat it too. If you have to build a native desktop app, you can use Chromium Embedded Framework. Spotify is one of its biggest users. You can still build your UI in HTML but drive it with native code (C++, Objective-C, C#, etc). We used CEF when we realized how painful Win32 C++ WTL desktop UI was.
codesmythe超过 8 年前
SWT rarely gets any love in desktop UI threads around here, but I recently wrote a small desktop program using SWT and Java and found it to be a reasonably pleasant experience. The main purpose of the program was to allow the user to view a couple of database tables, and using a tree view widget with columns was a key requirement. SWT is the widget toolkit used by Eclipse and is mostly native, using GTK on Linux, Cocoa on macOS and the Win32 API on Windows. It is still in active development, and support for HiDpi was recently added.<p>I started off with an Angular 1 app using Dropwizard for the backend. But I was frustrated with (1) the incidental complexity needed to use a decent tree view widget with sorting, filtering, pagination, etc. and (2) the slow response time of having to go from the web page, to the backend server, to the database and then back again.<p>Around that time, I ran across a Java Swing app written by another group and was surprised about how fast it was to start up and to access and display info from a database. Since it used Swing though, the fonts under Red Hat 6 were terrible. Since I already had most of the &quot;business logic&quot; in Java, it was straightforward to quickly prototype a viewer using the SWT&#x2F;JFace tree viewer. It was fast to start up, and the fonts looked decent since it was using native GTK2. I dropped the Angular stuff and coded the program in SWT and it has been well received by my coworkers.<p>I&#x27;m a big believer in using native widgets to the extent possible, which SWT does. For the tree view widget, for example, it uses GTKTreeView for Linux and NSOutlineView for macOS. For Win32, there is not a native tree view widget with columns; SWT uses the native Tree widget and draws the columns itself. Qt on the other hand emulates a treeview widget on macOS for example and does not use NSOutlineView.<p>There is occasionally a least-common-denominator issue when using SWT. For example, I wanted to use tab widgets that have close buttons on the tab like web browsers do. The native Win32 and Cocoa tab controls do not provide for close buttons, so I had to use an SWT provided tab widget that is not native at all. Doesn&#x27;t look great, especially on the Mac, but it&#x27;s fine.<p>The SWT API is dated, as it comes from the early 2000&#x27;s, but it seems straightforward and I rarely find myself surprised. Getting the GridLayout to do what I wanted was probably the trickiest part. There are examples to follow on the web. It does not have the kitchen sink aspect that Qt and WxWidgets have, since Java is there to provide the networking and database access, etc. Java 8 cleans up a lot of the issues with having to use anonymous inner classes everywhere in favor of lambdas, and if Java is not your cup of coffee then SWT is usable from other JVM languages.<p>Deploying the program works ok. For macOS and Windows, I package it up with its own JRE. I do face the issue of the best way for end users to update the program easily. I haven&#x27;t found an easy to use update package like Sparkle on macOS that works for cross desktop platform Java apps. I&#x27;m contemplating turning my program in to a full Eclipse RCP program to take advantage of that framework&#x27;s built in update facility, but the learning curve seems daunting. And I&#x27;m a big fan of Intellij IDEA for Java development, and don&#x27;t want to use Eclipse. :-)
评论 #12377857 未加载
评论 #12378839 未加载
BatFastard超过 8 年前
Adobe AIR - much as people like to hate on flash, Adobe AIR kicks ass as a cross platform UI. It has years of use and abuse.<p>Its one downside is if you need really low level hardware interaction with OS you have to use an ANE library which are sometimes great, and sometimes sketchy.
matthewhall超过 8 年前
Electron shell without a doubt. HTMl is so fluid and extensionable that it is hard to beat. It doesn&#x27;t work on mobile however. Also it isn&#x27;t as fast as c native but you use node js which is greater than pure js for obvious reasons.
cel1ne超过 8 年前
I&#x27;d probably use Electron and&#x2F;or SWT along with javascript and kotlin.
evolighting超过 8 年前
QT!
评论 #12376480 未加载
fezz超过 8 年前
I like JUCE. <a href="http:&#x2F;&#x2F;www.juce.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.juce.com&#x2F;</a> It&#x27;s used for a lot of audio apps and plugins but lots beyond that too.
评论 #12378994 未加载
sergiotapia超过 8 年前
Electron I would say. You make your UI&#x27;s using HTML and CSS, it looks the same everywhere. Not bad, I guess although it does have it performance issues.<p>Atom for example is built with Electron.
max_超过 8 年前
I have used Electron previously, but now Ionic is my favorite <a href="http:&#x2F;&#x2F;ionicframework.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;ionicframework.com&#x2F;</a>
评论 #12377336 未加载
评论 #12378645 未加载
kev6168超过 8 年前
There is Livecode (livecode.org). Does anyone have experience using it in production? It&#x27;s cross-platform and has both commercial and open source (community) versions.
评论 #12377948 未加载
Toover超过 8 年前
Qt with no hesitation. It works everywhere.
skoocda超过 8 年前
I&#x27;m surprised nobody has mentioned Angular 2 yet. It&#x27;s new, so don&#x27;t expect tons of support. Nonetheless, it&#x27;s there as an option!
评论 #12378736 未加载
Toover超过 8 年前
Qt with no hésitation. Works everywhere.
undoware超过 8 年前
Motif. &gt;:]
robot超过 8 年前
The best one I know is html 5
elcct超过 8 年前
I see nobody mentioned Juce. It is pretty neat if you like C++
评论 #12376579 未加载
评论 #12376540 未加载
EddieSpeaks超过 8 年前
Why isn&#x27;t anyone here mentioning Xamarin + GTK#?
评论 #12377049 未加载
评论 #12378990 未加载
totocino超过 8 年前
Qt obviously, but beware of licencing
评论 #12376500 未加载
评论 #12376531 未加载
indubitably超过 8 年前
The internet.