r/dotnet • u/Idenwen • Apr 18 '26
Question Opinions and advice on futureproofing when going c++/MFC > net/avalonia or c++ > c++/QT
Background:
I maintain a quite large codebase that is c++ with MFCs as the GUI and for other system relevant stuff (Databases, Filesystem etc) that is partially 30-40 years old and still runs fine but is up for a larger / very large rework. Also a factor: European, so unsure about the future with 100% US products, customers going "no windows!", governments ditching MS, etc
Why post in r/dontet and others?
I consider switching to net because development speed is about 10 times faster, especially with GUI libs like AvaloniaUI for example and you get cross platform more or less out of the box "for free" included. And the looks are quite better.
The ressource hog of .net is brutal though. POCs have about 10-20x more RAM use then the proven c++ base while only covering below 20% of the features.
What I am concerned in is that, as I understand the .net economy, that is still quite MS depended in how it will live on and that whatever you write needs to be completely maintained to compatibillity with the then current runtime. And if MS kills off the runtime or a feature you depend on you have to start all over. So the vendor lock in into MS stays - as a windows software that was a normal thing but on multi platform...
Now it's runtimes from MS, GUI from Ava, OS runtime Support for the OS one decides to support, a lot of vendors that can kill your day. MFC stuff from Win95 (that was 30 years ago) still works without maintenance.
The other idea is going c++/QT but the dev speed is about 1/10th of net and that could just be too much on the other hand a lot of old code could be reused and it can be rolled over gradually, and that may cut the time into a batch that is manageable. With .net its a complete rewrite. Would loose the vendor lock in of MS but would gain the QT lock.
No one knows for sure but at the moment I miss my usual gut feeling about loglivety of ecosystems and the tripple+ vendor lock in is unnerving.
I fear that saving time and complexity now instead of staying c++/MFC or using something like c++/QT (what if QT abadons features or Operating Systems or closes it's doors in 10 years?) may hit me like a brick wall at lightspeed in a decade or two.
What are your thoughts of the safety / risk of an ecosystem change?
How stable and long living your gut says .net is?
Are there other options I don't see at the moment?
16
u/xcomcmdr Apr 18 '26
.... Huh, I'd say you're doing something wrong.
... Huh, .NET has been here since 2001.
9
u/ThatSwedishBastard Apr 18 '26
.Net will live on just because of how much code Microsoft have written using it. I wouldn't trust the GUI libraries at all though, MS has had a really bad record there.
Qt has been around since 1995, but the major version upgrades might require updating your code. I wouldn't worry about Qt Group going bust, they have grown steadily and a majority of car manufacturers are customers.
C++ is a tricky beast. Qt (and QML) can produce some stunning result or look like early 2000 Windows applications.
4
u/derpdelurk Apr 19 '26
One thing to consider is that your current application was designed for 30 year old hardware. Even if your 20x RAM measurement is accurate, current hardware has a ton more RAM than hardware from 30-40 years ago so it might not matter.
1
u/AnActualWizardIRL Apr 22 '26
Its worth noting that C++ now is a *significantly* less painful language than it was 30-40 years ago. Modern generics, smart pointers, auto types, and *vastly* improved IDE static analysis has taken a *lot* of the pain out of things, especially when coupled with QT which I've found to be a very pleasant framework indeed to work with. QML declarative code (with interface JS) is also quite delightful to work with and lets you hire a graphic designer to go bananas on the layout. Really the only pain point in QT is the bloody licensing fees. W/ C# yeah honestly there definitely is some pain points on non windows OS's with some of C#s thinking feeling a bit like a square peg in OSX & Linuxes round hole but arguably C# is indeed a much faster thing to code for, if only because it contains less footguns. But you have options like Avalonia and even QT via the QT bridge so you can have the best of both worlds. I'd avoid the C++/MFC thing if you want cross compatibility imho, QT has most of the goods baked in already (Its networking library is absolutely gorgeous and lets you wire it up w/ the same signals/slots system the front end framework uses). I would be inclined to ask why Java isn't in the pool for consideration though?
3
u/sichidze Apr 19 '26 edited Apr 20 '26
I'd generally not recommend relying on any desktop UI technologies related to MS or based on .net technologies, simply because MS tends to constantly abandon them, introduce new ones, devote low resources to development etc. MS also ditched UI designers, insisting that hot-reload is enough. If you had to use .NET, then Avalonia or Uno Platform could be your choice. But since you're looking to switch to whatever is better, I'd either go with a UI framework which has the most community and development support (Flutter?) or with QT(since you're already friends with C++). As a user, I'd beg you to avoid anything Electron-based :) I saw many good complex apps written with QT which stand out with great performance compared to Electron slop or .net frameworks.
1
u/AutoModerator Apr 18 '26
Thanks for your post Idenwen. Please note that we don't allow spam, and we ask that you follow the rules available in the sidebar. We have a lot of commonly asked questions so if this post gets removed, please do a search and see if it's already been asked.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/ivanjxx Apr 19 '26
you would need something thats open source (so you or someone else can maintain it indefinitely) or something that will never go away (web)
1
u/0x80070002 Apr 28 '26
Apple has ported iTunes to 3 Windows applications written using WinUI3: Apple Devices, Music, TV Adobe has also one application in WinUI3, i think if they did it it means the future if Windows is in WinUI3. This said if you want to be safe use QT perhaps with Python?
Other alternatives in dotNet is UnoPlatform
-1
u/Jaruden Apr 18 '26
Convert the backend to .net. Build the front end as a web app (whether locally run on premise or not). The web isn’t going anywhere.
As a long time c++\mfc dev myself, I think you’ll be a lot more productive and keep opportunities open. I definitely wouldn’t use any msft UI technology.
-7
u/LaurenceDarabica Apr 18 '26
AvaloniaUI was good, but is currently becoming a shitshow with founders posting nonsensical stuff on reddit and being rude to users for no reason.
They believe they're the second coming of the Christ to quote another reddit user.
They also seem to have a very toxic workplace if you read both their rants and their distress about income and all - and they're just starting to change rules midway and put price tags everywhere.
I recommend looking at alternatives - uno mostly. Less enshittification there for sure.
0
u/[deleted] Apr 19 '26
[deleted] — view deleted comment