Live data from Hacker News

Writing GUI apps for Windows is painful

tulach.cc

371–380 of 577 posts

Re: Writing GUI apps for Windows is painful

#371

Earlier quoted context omitted.

I'm amazed Fury3 worked under WinG. I used WinG for some simple 2D games, but I don't think I would have tried texture-mapped 3D! We wrote this game on DirectX 1.0. It was a pig because the game was designed to be all 2D sprites, but early in the project it became clear there wasn't enough RAM, so I wrote a 3D engine that integrated with the 2D backgrounds. The video cards of the day didn't like that shit, and there…

Wow that looks pretty slick. Now I know why early Windows don't have competitive games and why things like WinG and DirectX are pretty big. I think Carmack did not jump on the DirectX wagon until much later.

Yes, he and Id pushing miniGL are pretty much why Glide lost and everyone was into MS-DOS and OpenGL graphics for a while.

However by DirectX 10, he was also not happy with OpenGL mess, and changed his mind on DirectX.

https://www.bit-tech.net/news/gaming/pc/carmack-directx-bett...

Re: Writing GUI apps for Windows is painful

#372
post #332

Earlier quoted context omitted.

I recently built a small app using SwiftUI. It was my first, and pretty simple. The documentation was absolutely maddening. . Half the time the Apple docs referred to a previous version. “Do this thing in XCode” often included screenshots of UIs that don’t exist in the current version of XCode. Examples I found on Stackoverflow or random blogs were usually no longer applicable. It felt like magic when it worked, all…

Thanks for the follow-up. These types of anec-data are the best part of HN. > It felt like magic when it worked, all those VStack HStack nestings I know the feeling from Qt. I think Gtk and many other GUI toolkits use the equivalent of VStack and HStack to make resizable GUIs. Some GUI toolkits try to avoid this problem by using a grid layout, but it is more rare. EDIT > made me seriously doubt whether I’d build a bi…

I don’t have much app experience, I’m mostly a back-end guy trying to build some prototypes and (hopefully) one product.

I’m not in a position to give anyone advice, but I’d love to find SwiftUI but cross-platform and usable from anything other than XCode (well maybe not Ed…) and native GUI and a pony.

For my product I need to support Mac, Windows and eventually iOS/iPadOS. For prototypes iOS is enough. I don’t mind learning new languages for this, but ideally there would be some advantage in knowing the language itself. I’ve been looking at lots of frameworks over the past month.

The most tempting thing so far is Flutter, but I have nagging doubts: because it’s not native UI, I worry about that being a no-go for some large customer down the road, and also about alienating power users. I looked at React Native but it’s not very good for desktop yet as far as I could tell (and the demo app from the documentation doesn’t work, which is a bad sign). Which is too bad because I was impressed with Expo, if I just needed phones I’d probably use that. I looked at Avalonia but it has the opposite problem.

Today I’m looking at Tauri for the Nth time: at least I could improve my Rust, and it seems to have momentum. Doing the UI in a web view is kinda sad, though, after trying SwiftUI.

Just building multiple apps is not realistic, I’m a solo dev and want to get this to market in my lifetime, and it only makes sense if I have both Mac and Windows.

Very happy to hear recommendations from people who have done this!

Re: Writing GUI apps for Windows is painful

#373

I have a very low opinion of developers who decry having to pay for a commercial licence for otherwise LGPL licensed software libraries. They expect to be paid for their work, and ensure that by creating closed source software. That's fair enough. Yet, the devs that solved the actually difficult parts of creating a UI library have to be utter saints who freely bestow a gift of code upon the world.

I think his complaint is not that he has to pay money per se, but having to pay several thousand dollars. That's a bit much for an independent developer.

Re: Writing GUI apps for Windows is painful

#374

> The result should be a single .exe file with no or minimal dependencies and a size of less than 40MB Computers come with a modern browser now. Instead of a .exe file, could it be, let's say, a single .html file with inlined image/css/javascript?

You just redicovered HTML applications from Internet Explorer 5.

Greetings from 1999.

https://www.developer.com/guides/ie5s-html-applications/

Re: Writing GUI apps for Windows is painful

#377

Earlier quoted context omitted.

If instead of insisting on custom UI styling the author just used the system UI, they could probably build a pretty straightforward Windows application. It’s the scourge of “brand identity” that has people thinking graphical applications are hard. Same on the Mac: If you want to build a Mac application, your best bet will be AppKit or SwiftUI and using system controls. And when the OS updates your application will ei…

This indeed. Custom UI widgets for Windows apps are really not necessary most of the time, and fitting in with the system theme is all you ought to aim for, most of the time. There are exceptions, for very rich dense UI, for UIs that need to be cross-platform, but if you're writing a Windows app, it should look and feel like a Windows app.

> and fitting in with the system theme is all you ought to aim for, most of the time

Even Microsoft struggles with that.

Re: Writing GUI apps for Windows is painful

#378

Earlier quoted context omitted.

Thanks for the follow-up. These types of anec-data are the best part of HN. > It felt like magic when it worked, all those VStack HStack nestings I know the feeling from Qt. I think Gtk and many other GUI toolkits use the equivalent of VStack and HStack to make resizable GUIs. Some GUI toolkits try to avoid this problem by using a grid layout, but it is more rare. EDIT > made me seriously doubt whether I’d build a bi…

I’ve had overall very positive experiences with Flutter. If I wasn’t concerned about Google’s long term commitment to it I’d use it for everything.

Did you do cross-platform and if so, did you use the same UI style for everything?

Today I was making a list of reasons/excuses for using Material Design on Mac… which I guess would make some people mad, but it might work for an enterprise product.

Re: Writing GUI apps for Windows is painful

#379
post #35

The solution you end up with will be a compromise on your requirements. E.g. if you can compromise on the 40MB size requirement then Electron should be a good fit to cover all your other requirements. Microsoft has developed VSCode with Electron. https://www.electronjs.org/

> if you can compromise on the 40MB size requirement then Electron should be a good fit to cover all your other requirements. Microsoft also supports React Native, which is arguably way better than any webview-based approach.

Unfortunely it is built on top of WinUI 3, with all the warts it entails.

Mostly because since they killed C++/CX, there is no UI tooling story for doing XAML C++, without having to deal with IDL COM like mess in Visual Studio, only worse in WinRT case.

Re: Writing GUI apps for Windows is painful

#380

I just write GUI's in tkinter (python), build a single .exe with nuitka, and interface with generalized application functionality either as a .dll or python module .. tkinter may not be the sexiest way to do things, but its definitely productive in terms of the code-compile-distribute methodology, and it is very easy to wire up to a generalized 'daemon'-style abstraction, where the app logic is implemented as a daemo…

Oh god, seeing TkInter applications, and inevitably, having to fix them particularly on macOS just fills me with rage. Whoever reads this - do not use TkInter.
Post reply on HN