Live data from Hacker News

Windows native app development is a mess

domenic.me

121–130 of 481 posts

Re: Windows native app development is a mess

#121

Let me chime in and say that plain Win32 API is a perfectly viable option if you are using C++ (or another "OO" language) and if you are willing to sink a couple of weeks into writing your own MFC-like wrapper. Clearly this is not an option for those who are just starting up with Windows GUI work, but with little experience it is really a matter of 2-3 weeks of ground work and then you have full control over all nuan…

Judging from the screenshots, that doesn't produce Windows 11 style UIs, right? I.e. it contributes to the problem exploree at https://ntdotdev.wordpress.com/2023/01/01/state-of-the-windo...

Re: Windows native app development is a mess

#122
post #11

I'm an embedded programmer who occassionally needs to write various windows programs to interface with embedded devices (usually via serial port or usb), and I find it a breeze to write native gui programs in pure win32 and c++. Recently had to add a new feature to and old program that was last updated in the XP era and two things to note: 1. The program did not need to be updated to run on Vista, 7, 10 and 11, shit…

I've not done MFC Win32 programming since 1999 but if I recall those programs don't execute the main() function. They instantiate the Win32 class for your app or something like that. I can't remember any details anymore.

Re: Windows native app development is a mess

#123
post #58
post #11

I'm an embedded programmer who occassionally needs to write various windows programs to interface with embedded devices (usually via serial port or usb), and I find it a breeze to write native gui programs in pure win32 and c++. Recently had to add a new feature to and old program that was last updated in the XP era and two things to note: 1. The program did not need to be updated to run on Vista, 7, 10 and 11, shit…

Honestly, your GUIs are too simple to be part of this conversation. Try writing something like Spotify in WinAPI and that's not even a complicated GUI either.

Spotify would be remarkably improved if it became a simple enough gui to be excluded from this conversation.

Re: Windows native app development is a mess

#124
The author is right, it's really such a mess.

The lessons I've learnt building and shipping a few a Windows apps at scale are basically:

(1) Learn Win32 and use those ancient APIs if possible, they're extraordinarily stable and you'll probably need to reach for them anyway. They're not that scary.

(2) Don't use any Microsoft-owned UI toolkit, you'll get burnt. Literally anything is better. Ideally choose a toolkit that doesn't prevent layering in Win32 tweaks on top, otherwise you'll end up hitting cases the toolkit developers didn't think of and you can't fix. You're going to need a custom WindowProc eventually. You need to have access to the underlying Win32 window lifecycle and handles.

Re: Windows native app development is a mess

#125
post #30
post #12

I wonder if Unity (the game engine) actually has a sneaky potential here. It’s cross platform, fast, and maybe just maybe less bloated than carrying around an entire browser like Electron?

Not sure about Unity, bot Godot is already used to build tools, like Pixelorama (pixel art graphics editor, a bit akin to Asesprite), RPG In A Box (game engine targeted for RPG games), Bitmapflow (tool to generate in-between animation frames), and probably more I don't know about. Well, if I remember correctly, the Godot editor is written in Godot.

Godot is written in C++ It may have some GDScript in there, but I don't think so. The sourcecode is available: https://github.com/godotengine/godot

Re: Windows native app development is a mess

#126

Let me chime in and say that plain Win32 API is a perfectly viable option if you are using C++ (or another "OO" language) and if you are willing to sink a couple of weeks into writing your own MFC-like wrapper. Clearly this is not an option for those who are just starting up with Windows GUI work, but with little experience it is really a matter of 2-3 weeks of ground work and then you have full control over all nuan…

Judging from the screenshots, that doesn't produce Windows 11 style UIs, right? I.e. it contributes to the problem exploree at https://ntdotdev.wordpress.com/2023/01/01/state-of-the-windo...

Screenshots are made on Windows 8.1 box, the windows chrome comes from there.

Plus the whole thing is meant to work on ancient Windows versions (like, Vista and WS2008 ancient), so that ultimately defines the minimal common UI denominator.

Re: Windows native app development is a mess

#127

"So when I went to work on my app, I was astonished to find that twenty years after the release of WPF, the boilerplate had barely changed." Such is the benefit and the curse, I guess, of having the Windows API being locked in the distant past for backwards compatibility. I've always been surprised that Microsoft didn't do a full operating system refactor and provide a compatibility layer for running old binaries. Pe…

They DID such a refactor for Win NT under David Cutler. Even in that comparatively simpler time it was a huge undertaking, and required all-hands-on-deck management that doesn't exist anywhere in tech anymore, let alone at today's Microsoft.

Re: Windows native app development is a mess

#128
post #3

> And from what I can tell, neither are most developers. The Hacker News commentariat loves to bemoan the death of native apps. But given what a mess the Windows app platform is, I’ll pick the web stack any day, with Electron or Tauri to bridge down to the relevant Win32 APIs for OS integration. Well yes as a user I prefer native apps for their performance. It's clearly a mess to develop native apps as the article sh…

Speaking about Electron, for my own little tools I have been using TypeScript+Bun with Electrobun.

https://github.com/blackboardsh/electrobun

Re: Windows native app development is a mess

#129
post #75

Earlier quoted context omitted.

After bouncing around GUI toolkits (from win32 to SwiftUI) and web for 30 years I have simply run out of fucks. They all suck. Each in their own unique way. Apple aren't worth singling out - they are just their own special isolated variant of it.

But, why? It's been 30 years. You'd think somebody would have figured out how to make a decent GUI toolkit or framework.

They generally get the design right after some mistakes and are stabilizing it, when the new UI designers take over and want to re-do it from scratch.

Re: Windows native app development is a mess

#130

The author is right, it's really such a mess. The lessons I've learnt building and shipping a few a Windows apps at scale are basically: (1) Learn Win32 and use those ancient APIs if possible, they're extraordinarily stable and you'll probably need to reach for them anyway. They're not that scary. (2) Don't use any Microsoft-owned UI toolkit, you'll get burnt. Literally anything is better. Ideally choose a toolkit th…

> "(2) Don't use any Microsoft-owned UI toolkit, you'll get burnt"

This is 100% true for all of their techs produced within the past ~20 years, but WPF and Winforms are extremely stable with no real issues.

It's so weird too because most of everything they've done in the past 20 years has basically just been incomplete remixes of WPF. If they just stuck with WPF and extended it onward, something like a UI toolkit equivalent of C#, it would 100% be the gold standard for Windows development today, and perhaps even UI development in general if they open source/standarded it.

Post reply on HN