Live data from Hacker News

Windows native app development is a mess

domenic.me

331–340 of 481 posts

Re: Windows native app development is a mess

#331

Earlier quoted context omitted.

There's a pretty simple settings window: https://github.com/domenic/display-blackout?tab=readme-ov-fi... Would that UI be hard to accomplish?

You mean conceptually or to match it? Native components are pretty much impossible to match without actually using the native framework which provides them, so you need WinUI/WPF. Win32 provides its own components which are basically Win95 style apps, and you can draw the components using some graphics APIs by yourself. The whole native development area is a mess exactly because making your own (decent) renderer is a…

But you are making false equivalence, the Win32 GUI API is decades out of date from modern UIs. I can use flutter and make a pixel perfect equivalent of the above UI in an hour, with the exact same responsiveness behavior on both windows tablets and desktop, and scales perfectly in high DPI displays. 3 hours if you want the toggle animation timing to be exactly the same.

I came from the WinForms world so don't pretend I don't understand Win32 programming. The fault lies with Microsoft for not investing in it more.

Re: Windows native app development is a mess

#332

I agree with all the comments here saying "stick with Win32" --- this is "a mess" that you can easily avoid. Speaking as a long-time Win32 programmer, the requirements for your app are doable in a few KB (yes, kilobytes --- my vague estimate is less than 8KB) standalone executable. This is how I arrived at that: Enumerating the machine’s displays and their bounds A few API calls. Probably a few hundred bytes. Placing…

There were decent and reasonably thin layers over that to solve the immediate practical issues (e.g. Delphi, MFC), but they're no longer fashionable and nothing seems to have replaced them in the same space. Maybe we need a "NoFramework" phase to get back to RAD again?

Re: Windows native app development is a mess

#333

Earlier quoted context omitted.

> Try writing something like Spotify in WinAPI and that's not even a complicated GUI either. Fruityloops, now FL Studio, was written in Delphi and to my knowledge still is[1]. When ot launched there were no options but Win32 for Delphi. That's just one example. Win32 makes it reasonably easy to skin things, and back in the 2000s a lit of programs did. [1]: https://blogs.embarcadero.com/fl-studio-is-a-massively-popul.…

> Win32 makes it reasonably easy to skin things Actually it doesn't. Win32 skinning is either making a control completely from scratch or hacking into undocumented aspects of the native controls - i.e. what WindowBlinds does. AFAIK modern Delphi has some component that basically follows the WindowBlinds approach.

> Win32 skinning is either making a control completely from scratch

In almost all cases you just need to handle the drawing yourself, and you get fairly broad access through the API to do so through the various non-client and client window messages.

Now, Windows has gained some newfangled components over the years with more or less integration, I'm thinking basic Win32 controls.

Re: Windows native app development is a mess

#334
post #56

Earlier quoted context omitted.

When Microsoft themselves use electron to develop apps what expectations can we have on other devs?

To decide what tools are the right job for each project, same expectation as always. So many “let’s race-to-the-bottom along with the authority” comments on HN lately. Dude: no! =]

I think more so I’m saying that the platform (metaphorical ship) is sinking.

Majority of applications on Linux are native applications. Maybe the problem is the platform?

Re: Windows native app development is a mess

#335
post #300

Earlier quoted context omitted.

For me, native means "I can integrate a platform widget in the middle of it". For instance, with Qt, GTK or wxwidgets it's entirely possible to integrate a Win32 / Cocoa / X11 component right in the middle of your app (and it's super important for instance for things such as integrating audio plugins, where the plugin only gives you a HWND or NSView and you have to draw your application Chrome around it, have it foll…

So then flutter will let you do that, with a little elbow grease.

doesn't seem like it can though? https://github.com/flutter/flutter/issues/31713

It's pretty much impossible to embed properly without edge cases in GPU-based renderers as far as I know, if you want layering of widgets (for instance a platform widget in-between two flutter widgets in z-order)

Re: Windows native app development is a mess

#336
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…

[dead]

Re: Windows native app development is a mess

#337

One of the challenges with the older methodologies was getting the damned things to look good. I distinctly remember with WinForms having to use DevExpress to get the theming to look moderately modern. Bit I still never bothered with the later approaches because it looked like I was going to lose out on speed and ease of development. WinForms may have looked ugly but you could bang things together pretty quickly.

I feel like WinForms was peak (because it was close to Delphi) and it went downhill from there.

Re: Windows native app development is a mess

#338

Earlier quoted context omitted.

Depends what you mean by "look good". The main function of the app being discussed here is to draw solid black rectangles on the screen. Don't forget the "average person", I'm assuming someone relying on software as a tool, doesn't care about the stuff "designers" seem to obsess over, and will actively hate if you break their workflow by doing things like adding useless padding that makes them scroll more or shows le…

There's a pretty simple settings window: https://github.com/domenic/display-blackout?tab=readme-ov-fi... Would that UI be hard to accomplish?

The functionality of that is not hard at all. A few checkboxes, a trackbar, and a hotkey control (there is actually a standard Win32 control for this: https://learn.microsoft.com/en-us/windows/win32/controls/hot... ), with "pushlike" checkboxes at the top to be drawn replicating the monitor layout.

But that "modern" style is... disgusting and repulsive. That whole dialog is bigger than one of my monitors due to how much wasted space it has.

Re: Windows native app development is a mess

#339
post #215

Earlier quoted context omitted.

Programming with GUIs?

Why wouldn't you program a GUI with a GUI if one is available? Avoiding the use of WYSIWYG editors when making GUIs is like avoiding the use of musical instruments when writing songs.

> Why wouldn't you program a GUI with a GUI if one is available? Avoiding the use of WYSIWYG editors when making GUIs is like avoiding the use of musical instruments when writing songs.

I've been a developer for a long time; I've built pretty large applications in all sorts of technologies and I now just prefer defining GUIs using text. Having a live GUI preview is great but actually dragging and dropping stuff is not more efficient to me.

To fit your analogy, using source code is like writing a song using musical notation. I'll write the song, then play it, and then go back to notation to fix it or expand on it.

Re: Windows native app development is a mess

#340

Earlier quoted context omitted.

Only a very small minority of users actually care about dark mode. It is not a general expectation for software, as loud as those users may be on forums like this one.

And how do you know this? I decided to check myself, looked for dark mode statistics on android, and: >Dark mode is used by 81.9% of 2,500 Android users on their phones, in apps, and in other situations. 9.9% alternate between the light and dark So it's the other way around. Only a very small minority of users actually care about light mode.

That survey was power users only: https://www.androidauthority.com/dark-mode-poll-results-1090...

I would be astounded if a majority of general Android users used dark mode, as light mode is the default on most phones (all, IME).

Post reply on HN