18 ms·
Ask HN: What is the best way to build a desktop app in Windows in 2023?
I’m talking the most native look and feel for the Windows platform.
Is it XAML and C#?
- slater 3y agoElectr..HEY...[gets beaten to a bloody pulp]
- civilitty 3y agoYour nerd card has been revoked.
- mikewarot 3y agoDelphi is probably the best, but I can't afford it. Lazarus is pretty good, except for the documentation, which needs a huge refactoring effort. You can put together small applications in minutes.
- mattl 3y agoWhat does the free personal version of Delphi not give you?
- mikewarot 3y agoThere is no "free" version, only a "if you make less than $X" version, which is a huge red flag for me. Lazarus is free, but due to the way their help files are build, incremental improvements in it are impossible, so it's just a list of arguments for functions, with no real explanations.
- mattl 3y agoAh, interesting. $5000 isn’t a lot for professional software developers but could be fine for hobby projects I guess. $1300 for the professional version is a steep price jump from $0
- PrimeMcFly 3y agoI had no idea Delphi was even still around.
- jefozabuss 3y agoLast time I used it it was with Turbo Pascal probably 18-19 years ago. It was a really decent IDE, nice to see it's still around.
- Clubber 3y agoDelphi was quite good at Windows application development last time I used it, probably 2010. I'd probably stay away if you ever need to maintain it or hire people to use it. There's value in using a popular language with staying power.
- adrianmsmith 3y ago> There's value in using a popular language with staying power. That's a good point about popular languages, but you can't complain about Dephi's staying power. Wikipedia shows it as having been released in 1995, and it still seems to be going!
- Clubber 3y ago>but you can't complain about Dephi's staying power. Wikipedia shows it as having been released in 1995, and it still seems to be going! Yes, but it's only really alive due to legacy systems. You don't often see new development done on it, at least in the US. Good luck finding a Delphi developer vs. Java or C#. I think it's still popular in Eastern Europe though. I do love the platform and I used it for probably 13 years, but it's wilting pretty hard today. I would never build anything of substance with it today.
- fuzztester 3y agoI hear now and then that Delphi is still popular in Germany.
- hbcondo714 3y ago.NET Multi-platform App UI (MAUI) is for cross platform development but certainly targets native apps on Windows: https://dotnet.microsoft.com/en-us/apps/maui https://dotnet.microsoft.com/en-us/apps/maui
- pjc50 3y agoMAUI is the inheritor of Xamarin. What underlying tech does it use for rendering on Windows?
- bmitc 3y agoThe answer is: pick your poison. There is no best way. Microsoft would have you believe it is WinUI, but there is also WinForms, WPF, UDP, Xamarin Forms, .NET MAUI, Avalonia, Uno, and several other solutions. Even the landing page for WinUI starts off by comparing the differences between two versions of it. https://learn.microsoft.com/en-us/windows/apps/winui/ https://learn.microsoft.com/en-us/windows/apps/winui/
- grumblingdev 3y ago> Even the landing page for WinUI starts off by comparing the differences between two versions of it. It feels like they are trying really hard not to annoy developers by telling them their stack is now legacy. They should take all old technology and put it on an entirely different docs website. > We've been there before, and intermediate layers between the platform and the developer ultimately produces sub-standard apps and hinders the progress of the platform. > >-- Steve Jobs - https://www.engadget.com/2010-04-10-steve-jobs-responds-to-complaint-about-new-development-tool-rest.html https://www.engadget.com/2010-04-10-steve-jobs-responds-to-c... I've heard Steve say this a few times, and it always caused developer backlash. But having seen how things have played out, I think he was definitely right. Honestly though, Windows should have just gone with HTML. The majority of HTML-based apps are nicer looking and feeling than Windows apps, and the perf is fine. I just don't know how they f'd up XAML/WPF so badly.
- turtlebits 3y agoAsking Microsoft, it looks to be either WPF or WinForms. https://learn.microsoft.com/en-us/dotnet/desktop/?view=netdesktop-7.0 https://learn.microsoft.com/en-us/dotnet/desktop/?view=netde...
- edandersen 3y agoTo make an app with the same "nativeness" as the "Settings" app, you need to use UWP, or WinUI 2.7+. But not 3.0+.
- jmaker 3y agoWhy not 3.0+? What’s changed?
- siproprio 3y agoThe namespace, basically.
- edandersen 3y agoThey decoupled the UI framework from the OS in WinUI 3.0. The point of UWP was that it used controls and rendering capabilities built into the OS. This resulted in performance regressions and missing features for several versions compared to the 2.8 branch.
- grumblingdev 3y agoGoddamn! I always wondered why it took until Win UI _3_ to decouple...but I guess this is why.
- pjc50 3y ago.. however, you're then stuck in the UWP sandbox, I believe? (edit: crucially I don't think you can use either of those with dotnet core?)
- fassssst 3y agoWithout more details, this is the way to get the most native Windows 11 look and feel: https://learn.microsoft.com/en-us/windows/apps/winui/winui3/ https://learn.microsoft.com/en-us/windows/apps/winui/winui3/ Disclosure: I work at Microsoft on a team that works on visual look and feel for Windows.
- jwells89 3y agoI tried writing an app using WinUI a few months ago and the widgets that it has are decent, but there are some major gaps compared to older Windows UI frameworks and Cocoa. The one that stands out most is its lack of a proper tableview/datagrid (think NSTableView in Cocoa). I know about the community widget but it doesn’t feel right to have to pull in a third party library for something so elementary. The look and feel is great though, Win11 is a nice step up from 8/10 in that department. So good to have depth, curves, transparency, etc back again.
- rossy 3y agoIt's a shame that, unlike with Win32, using WinUI places pretty harsh restrictions on which programming languages and environments you can use. Only C# and C++ are supported, the latter only with Microsoft compilers. For everything else, including Rust[1], Python and MinGW C/C++, there is no answer for OP's question, and the effect of this on the visual consistency of the Windows desktop is obvious - there is none. Every third-party app uses a different toolkit with a different look and feel, because the library providing the standard look and feel simply isn't available to the majority of developers. [1]: https://github.com/microsoft/windows-rs/pull/1836 https://github.com/microsoft/windows-rs/pull/1836
- technion 3y agoThat's horridly confusing given MS has a Rust crate "Windows" has a "UI" Module that I guess is something different to WinUI. https://microsoft.github.io/windows-docs-rs/doc/windows/UI/index.html https://microsoft.github.io/windows-docs-rs/doc/windows/UI/i...
- lowleveldesign 3y ago
- fckmsft 3y agoYou need to check whatever half-arsed framework "that will be universal and encompass everything" Microsoft is promoting this specific month, and then violently ignore it and use proven things like wxWidgets or WinForms instead. (There is no native look and feel on Windows any more. Microsoft pissed on that concept a long time ago.)
- deleted 3y ago[deleted]
- joeld42 3y agoI am using Avalonia. If I were doing windows only I might use MAUI or WPF or something but afaik they are pretty similar, and I want it to be cross platform on mac. The interface of the app is C#, the core is in CPP (I am tempted to use Zig but haven't worked with it enough to commit to it yet).
- m_fayer 3y agoThis option is painfully underappreciated.
- yumraj 3y agoLooks like MFC is still a thing.
- madduci 3y agoDefinitely, that would also be a solution, but how risky is to bet on it?
- Shorel 3y agoIf MFC are an option, then wxWidgets is also an option.
- yumraj 3y agoSure, but MFC is from Microsoft. wxWidgets is not and things may have changed but my experience with most cross-platform libraries back in the day was that they could get close but never get real native UI experience.
- Shorel 3y agowxWidgets is as native as MFC. It is the same real controls, Win32 style. It is the only cross-platform library that uses native Windows controls. Qt? Emulated. GTK? Only native in Gnome, emulated on Windows. Even the new APIs, like WinUI, from Microsoft, are less native than wxWidgets.
- dylanzhangdev 3y ago[aardio](https://aardio.com/ https://aardio.com/) I have been using aardio to develop desktop software for more than 4 years. I have developed many software. It is designed specifically for Windows desktop. - Based on the syntax of Lua and JS, if you have one of these 2 foundations, you can get started in 1 hour. - Comes with an IDE, developing, compiling, debugging, rich standard libraries and sample code. - Support WYSIWYG UI control drag-and-drop. - Supports WebView2 and native development mixed - Support the use of Python, Go, C#, etc., can be used as a glue language. - The size of the packaged file is very small - The IDE and tutorials, documentation, and IntelliSense are only available in Chinese, but by using translation, it shouldn't be too much of a problem. For experienced programmers, it is easy to understand.
- Alifatisk 3y agoIs there an english version of the site?
- dylanzhangdev 3y agosorry, no.
- thesuperbigfrog 3y agoWhat does Microsoft use? If Teams, Office, and VS Code are any indicators it is web-based technologies: https://techcommunity.microsoft.com/t5/microsoft-365-blog/4-recent-office-innovations-that-were-born-on-the-web/ba-p/723089 https://techcommunity.microsoft.com/t5/microsoft-365-blog/4-... https://support.microsoft.com/en-us/office/office-is-now-microsoft-365-22eac811-08d6-4df3-92dd-77f193e354a5 https://support.microsoft.com/en-us/office/office-is-now-mic...
- grumblingdev 3y agoClicking on the second link and pressing back doesn't work until you click cookie accept :(
- johnea 3y agoQt: Not only do you also get builds for Mac and linux, but everytime MS updates .NET the Qt framework supports these changes so you don't have to.
- paulryanrogers 3y agoQt Widgets, unless you need a really quick turnaround time. Just beware the commercial license, apparently it can't be used with FOSS.
- anakaine 3y agoYou also need to do extra work to build in slots and signals, which tou don't need to do with many, many other frameworks. If tou don't put the extra work in learning that stuff, and it does require effort to learn, then you wind up with an application whose interface locks up if it's doing anything non UI related between UI calls. QT is great, until it's not, then it sucks.
- dansiemens 3y agoMicrosoft is using React Native for Windows [0] for their Office applications [1]. As a fan of RN this would be the first avenue I’d explore if I had to develop something for Windows. [0] https://microsoft.github.io/react-native-windows/ https://microsoft.github.io/react-native-windows/ [1] https://microsoft.github.io/react-native-windows/resources-showcase https://microsoft.github.io/react-native-windows/resources-s...
- nik736 3y agoThis is a bit misleading. Only minor parts of Office are built with React Native, not the whole thing.
- xerox13ster 3y agoTeams is, and it's IMO the worst Office app available. I don't have time to get into all the reasons why right now because I need to sleep and it always leads to a 30 minute irl rant or a multiparagraph screed about the complete breakdown of their corporate work culture and terrible UI tooling that they can't fix a context menu rendering bug in their own damn "native" first-party corporate communications app when _They're The Company Writing The UI/GFX API THAT REACT NATIVE USES!!!!_ hooooosaaaaa I don't work there anymore, I don't work there anymore. Good night HN.
- jmaker 3y agoWould appreciate if you could spare some time to elaborate. I’ve had pretty much the worst experience with Teams of all communication solutions. I just can’t figure out what’s going on with it. On Macs it constantly misbehaves. Is it due to RN?
- happymellon 3y agoNo. Teams is a terrible application regardless of the UI Framework. This is not to say that React Native is good. Teams tries to be your new desktop, it provides a file browser, calendar, meeting scheduling, access to edit your Office documents and take One Notes. It reminds me of an alternative shell for Windows 95. It also has an embedded chat app. This embedded chat app has new messages at top on some tabs, and new at bottom on other tabs. It prevents me from having more than one chat open. This chat app only supports RTF for formatting (who the fuck still uses RTF?) which means it struggles to process markdown and other rich formatting. Pasting some text that it decides is going in a box can be laborious to remove. It's just a bad app.
- yett 3y agoWinUI 3
- farseer 3y agoI will say it without fear: nothing beats electron in beauty and eye candy. You have the entire HTML5/CSS3 at your disposal.
- hulitu 3y ago> nothing beats electron in beauty and eye candy. Beauty is in the eye of the beholder. Even Windows 2.0 looks better than Teams.
- satvikpendem 3y agoBoth of these comments are strange, so I may be misunderstanding, but with any UI framework, one can make them look however they want through custom styles, design is not dictated through the framework itself but by the styles.
- lukew3 3y agoIgnoring your question about most native look and feel, I'm curious why Electron is still being suggested when Tauri exists
- dmitrygr 3y agoMFC never went away. And you can target winNT all the way to win11
- fuzztester 3y agoBut it was/is complex to learn, no?
- dmitrygr 3y agoOP asked for best way, not easiest
- fuzztester 3y agoI was aware of that It is possible to be both.
- Panqueca_do_mar 3y agoDotNet core using webview 2 and something like react for the frontend. Or you can look into https://tauri.app/ https://tauri.app/
- madduci 3y agoI will still place my bet for C++ combined with a third party UI Framework. I know that Qt has changed its license model, but it offers many capabilities and is battle-tested enough. Otherwise another shot could be a Java/JavaFX application, possibility compiled natively or packaged with jpackage, so you deliver your own tailored JVM, without requiring the installation of a JRE on the user system. Another way would be to embrace the Microsoft ecosystem with the Windows UI Frameworks and then use C# or C++
- grumblingdev 3y agoI don't get how MS can't just build a control library. You always have to use these expensive third-party closed-source libraries. I remember when the Ribbon UI came out. And there were like 10 different vendors making all different ones, each with a different look and feel. Just like Amazon took internal services and made them exposable in AWS, so should Microsoft with every UI component they build. You shouldn't be able to ship any UI internally, unless you make it publically accessible. I guess WinUI 3 is heading in these direction by decoupling from the OS. But boy it took a lot of time!
- deterministic 3y agoIf you want a performant application use C++ and Win32. Yep I am serious.
- melvinroest 3y agoIf you're feeling adventurous, I'd try Pharo [0]. I was at the ESUG conference (the European Smalltalk conference) and it seems that when you combine: * Bloc (UI framework) * The stuff in their new presentation (will be online in a few months) * Pharo You could get pretty far. For example, this game [1] has been packaged as a Win/Mac app [2]. [0] https://pharo.org https://pharo.org [1] https://github.com/Enzo-Demeulenaere/Takuzu https://github.com/Enzo-Demeulenaere/Takuzu [2] https://github.com/tesonep/takuzu https://github.com/tesonep/takuzu
- grumblingdev 3y agoSomeone should bring the SmallTalk IDE experience to JavaScript.
- GeneralMaximus 3y agoI really REALLY want to use Pharo to build something significant -- I love the ideas behind Smalltalk -- but I've been disappointed every time I've tried. My problem is that, in 2023, Pharo still doesn't support high DPI displays, which means it's a blurry mess on every single display currently in my house. It's blurry on my M1 MacBook Pro, on my PC with Windows 11, and on the Lenovo X1 with Ubuntu I owned briefly during the pandemic. It's blurry on all the external monitors I own. If I could run it on my iPad, I bet it would be blurry on my iPad too. Bumping up the font size in the IDE settins is a reasonable workaround for this issue, but it's not a good long-term solution. While it makes the text in the IDE readable, other UI elements are still either comically tiny or blurry, depending on your settings. Sometimes there are some UI elements that scale up with the font size, and others that don't, which results in an inconsistent UI that's hard to use. MacBooks have had "retina" screens since 2012, and 4k displays are increasingly becoming more common. I hope Pharo will eventually support proper UI scaling, because I can't try out your cool futuristic IDE if I can't even see it properly!
- melvinroest 3y agoHmm odd, I develop on an M1 Pro and I feel fine with how Pharo looks.
- m_fayer 3y agoBlazor hybrid is very productive if you want to stick at least somewhat to the Microsoft world and retain the power and ecosystem of web-ui.
- bags43 3y agoWPF with some external controls. - Still supported on latest .NET - Most feature rich and battle tested - Good documentation - You will learn XAML which can be later used once when WinUI 3.0 is more mature (at least another 5,6 years will be needed with their current development velocity) PS. XAML is a bit different but similiar enoguh between WPF and WinUI. Of course it depends on what type of application.
- deleted 3y ago[deleted]
- NoZebra120vClip 3y agoI'll tell you, PWAs were my "gateway drug". Once I realized that practically every app worth using was installable as PWA, I began to question why I would even need Windows anymore as an OS layer. Since PWAs run in the browser of choice, they are definitely native, especially if you choose Edge, which is approaching dominance on the platform. PWAs grant automatic cross-platform ability. I can install and run PWA in Windows, Android, ChromeOS, you name it. Also it is super minimum hassle. Windows never bothers me about the Store, or signing, or updating any PWA; it's simply transparent.
- jeffrallen 3y agoAssembly: https://www.plantation-productions.com/Webster/Win32Asm/index.html https://www.plantation-productions.com/Webster/Win32Asm/inde...
- steve1977 3y agoI guess the variety of comments shows one thing: the answer to your question is: if it’s an option in any conceivable way - don’t!
- JohnDeHope 3y agoThe answer to this question is: you have asked the wrong question.
- znpy 3y agoMy gf did exactly that for work. It was a fairly complex desktop app that did a number of interesting things in the domain of graphics too. It was a simple C++ and QT app, with the necessary domain-specific libraries. If you need to develop a non-trivial gui app in windows then C++ and QT is a great combo.
- CrimsonCape 3y agoPeople in this thread are looking at this like a "top-down" case of "when is Microsoft going to hand down the magical UI solution to everyone" when in reality, Microsoft is in the same boat as all of us which is that there is no clear direction to the future of non-web UI. That leaves the opportunity of the future to the community. And I think we want to convey the message that 1. We have web UI options, so don't reinvent that wheel. 2. Windows is not web, so give us a UI that is desktop-centric. And in that vein, people use desktop for complex tasks, so don't try to force Windows into colorful Duplo-sized buttons and style (don't make Windows web: i'm looking at you WinUI, Xamarin,etc; all more recent Microsoft offerings ditch the complexity and move toward web design). We demand feature rich, deep, complex systems. WPF is the most advanced UI designer ever created. WPF was made open-source (mostly) and then mothballed. It's way too complex to build from source and they are accepting nearly zero PRs from non-Microsoft sources. Maybe the move to send WPF management to the India team was a possible way to increase activity around WPF (since its repo has been drydocked and managed by like 3 people for years). Avalonia is nice, but not nearly as capable. I would love a potential future to be Microsoft dusting off WPF and getting serious about open-source. Fix some infrastructural problems like building from source that allow developers to begin exploring how to rebuild the rendering engine, preferably using something GPU-driven like OpenGL. There is a lot of excitement in the realm of using game engines to render UI, it would be great to have some team members be architects to design the retained-mode side of the UI interfacing with team members that are immediate mode designers, think OpenGL, Vulkan, etc. Having looked through the WPF source code, this is pretty much how it was, the WPF logic interfacing with Windows draw calls. It's just outdated. WPF isn't fully open source, which is a huge problem. A lot of the low level graphics calls are still calling to non-open-source Windows libraries, so it's really opaque how to modularize the rendering calls. Microsoft needs to spend a year devoting a team to internally forking Win32 and then building interfaces for every WPF call into non-open-source rendering code. Then the community can actually fork some alternatives using modern graphics renderers. I don't think we will ever see this though. Microsoft, despite languishing as a market-mover, has too much temerity to give the community this kind of control over it's core. They want WPF as an "outdated" technology to be reliant on Win32, instead of wanting it to be replaced with something more modern. They will happily keep releasing incomplete and remedial UI frameworks built atop antiquated DirectX forever.
- kcartlidge 3y agoFree Pascal with Lazarus. By career I'm mostly a C# person but (IMHO) everything desktop UI that Microsoft have done since WinForms has proven to be not worth using for the long (or even medium) term.
- bvoq 3y agoFlutter is not a bad choice if you want to build a cross platform app.
- Alifatisk 3y agoYeah, I’ve done Flutter for Windows only and it was actually quite pleasant. There is even a dart package which recreates the Windows ui very well! And the builds was very small! Barely a couple of MBs.