8 ms·
WinForms and its Visual Studio designer are still broken, WPF is still riddled with bugs and was declared obsolete in ~2017 in favor of UWP, UWP is marked obsol
by foepys 5y ago
WinForms and its Visual Studio designer are still broken, WPF is still riddled with bugs and was declared obsolete in ~2017 in favor of UWP, UWP is marked obsolete in favor of WinUI, and WinUI's OSS release was postponed just two days ago because it's not ready.
Microsoft is marketing .NET 6 as the replacement for .NET Framework but you still cannot properly do desktop UI with it. I honestly don't understand why they are pushing more and more features when they cannot complete the ones they started years ago. Not to mention that porting WinForms from .NET Framework to .NET 6 requires a rewrite for anything more complex than a Hello World.
- addicted 5y agoThe UI story on Windows is completely broken but that has been the case forever. Has MS basically released anything sustainable on the UI side since MFC? It feels like they’ve constantly provided a new new replacement every few years that replaced the new replacement from a few years ago since then.
- foepys 5y agoThat's definitely true but they did a good job supporting their tech once it was released. My company has been using WinForms on .NET Framework for over 10 years now and it's working really, really well. Microsoft even added HiDPI support to it. When Microsoft announced they wanted to bring WinForms to .NET Core 3, we were initially very happy as it meant we could switch to .NET Core. But then they did all kinds of shenanigans with it and completely rewrote the designer for .NET Core in Visual Studio, which is now riddled with bugs and crashes constantly. You cannot even load your own custom controls into it. I mean, you can, just get Microsoft to let you sign an NDA to get access to the APIs...
- beermonster 5y ago> My company has been using WinForms on .NET Framework for over 10 years now and it's working really, really well. Despite WPF being preferred amongst developers, WinForms solves most use-cases well. I’ve not really kept up with Microsoft UI developments but I’d be interested in seeing any cross-platform UI toolkits they develop now or in the future just as an alternative to gtk/qt
- pjmlp 5y agoThe problem is that many features in Forms like data binding or layouts, have bugs, which happen to be only fixed on WPF, because that was the new boy in town. So when you move beyond VB6 style of applications, there are several head scratching moments.
- lbriner 5y agoSadly this is their policy across the board. Even though things like dotnet core 3.1 is supposed to be LTS, when you report a bug, you are most likely to get the response, "we will only fix it in .Net 5" as if upgrading everything is a 5 minute exercise. For a company who turns over an enormous amount of money and employs 10s of 1000s of people, you would have thought they could support these separate frameworks with dedicated teams of 10-20 reasonably high calibre devs.
- ygra 5y agoThey had to rewrite the designer for .NET Core since the designer runs your own controls' code right during design time (pretty horrifying on one end, but also enables a fairly integrated experience with custom controls). Since Visual Studio is based on .NET Framework the designer had to move out of process, as the only alternative would have been no designer at all. So that's a twenty-year old codebase, perhaps on both ends (Windows Forms Designer and Visual Studio alike) that now somehow has to be moved to different processes and different runtimes. Perhaps you have more luck with JetBrains Rider, although from what I've seen they simply host the very same designer in pretty much the same way as Visual Studio and thus are unlikely to fare any better here. The other option is the still-recommended workaround of keeping the .NET Framework project files around and do designer stuff with those. Also annoying, admittedly, but that's what I've been doing for now (well, for other reasons as well, as we sell a .NET UI component that still has to work in .NET Framework as well).
- mattmanser 5y agoNo they didn't. Take a look at what happened to silverlight or UWP. You just happen to be working in the one tech they actually carried on supporting.
- pjmlp 5y agoUWP is still supported, that is what WinUI is built on. The problem is that they now seem to somehow carrying that flag forward on top of XAML Islands, with an endless list of bugs.
- tonyedgecombe 5y agoI had a lot of problems adding HiDPI support to a moderately complex WinForms application. It was a huge time sink.
- tomnipotent 5y agoIs there a UI story that doesn't suck?
- scns 5y agoMaybe, if you change your perspective. From buddhist teachings i learned that we react emotionally to the labels (our judgements) we attach to what we perceive, not realitty itself which just is.
- jcelerier 5y agoI'm mostly doing my UIs in Qt and I'm always happy, sure it's not perfect but it consistently allows me to do what I want in a cross-platform way with minimal effort (especially when I compare with the royal empirical pain that is webdev)
- whoknowswhat11 5y agoFor windows what's your hello world workflow / stack. I've wanted to get into QT, but there seem to be a bunch of different flavors out there. I'm more a winforms guy then an HTML/XAML/CSS type person.
- gmueckl 5y agoOn Windows, there are two easy ways to get started: Qt Creator and the Qt Addin for Visual Studio. Qt Creator is easier, I think. Personally, I use Qt Widgets a lot and ignore Qml, because the later has seemingly much less powerful widgets out of the box.
- jcelerier 5y agoI'll be honest I don't think that doing C++ on windows is a good idea. The language needs to do a lot of file access for includes, and on NTFS those are super slow, my builds on Linux are something like 1/3 of the time on windows (building the same software with the same commit of clang 12 and lld, same computer, same SSD). But if you don't want to install a Linux partition, then just use aqt to install Qt: https://github.com/miurahr/aqtinstall https://github.com/miurahr/aqtinstall You want win64_msvc2019_64 as a platform. Way too often I see everyone clicking on everything in the installer which amounts to a 30gb download, but for the immense majority of Qt apps you just want the core libs for your platform which is like a couple hundred megabytes (and even then in practice you're going to use only a small part of those unless you have uncommon needs such as serial port, modbus or NFC communication, XML parsing, ...)
- jussij 5y ago> Has MS basically released anything sustainable on the UI side since MFC? MFC is nothing more that a C++ GUI library wrapping the Windows Win32 GUI layer. The problem with that Win32 GUI is it has not changed for several decades, which is why any application using that Windows GUI layer looks old and outdated on modern Windows. Since Microsoft is not updating the Win32 GUI layer, it is basically obsolete. However so many Windows applications still use that GUI layer and that then makes the Windows UI a complete mess.
- deleted 5y ago[deleted]
- zozbot234 5y agoWin32 GUI supports theming, that's what Windows XP's Fisher Price UX was all about. "It looks outdated on modern platforms" is a non-issue and total BS.
- cbsmith 5y agoMFC was kind of a weird beast in general. In some ways it was just a C++ GUI API for Win32, but it did have distinct traits and behaviors that have MFC apps a subtle feel that many found unappealing.
- pjmlp 5y agoActually not even MFC was that good when it appeared into the scene. Borland C++ and Delphi/Turbo Pascal frameworks have always been top notch, and Qt follows their way. MFC was re-created too low level, because the C guys at Redmond wouldn't use it, the Afx prefix comes from that first attempt. I do like Forms and WPF a lot, so I fail to see what is broken about them, other than the missing love from doubling down on WinRT since Windows 8. Ironically, MFC is the best framework for doing C++ GUI on Microsoft stack. With C++/CX they could have had a C++ Builder like experience, instead politics made C++/WinRT replace it, while whoever is in charge doesn't care about Visual Studio tooling. So using C++/WinRT is akin to being back in Visual C++ 6 alongside ATL, editing IDL files with a Notepad like experience.
- qwertox 5y agoWinForms was definitely very fun to code with when I used it around 10 years ago. MFC on the other hand was a real pain. Some strange thing came afterwards which I never understood why, but then I already moved into Backend/HTML/JS. Is WinForms really something that is outdated? Or is this new thing one just their attempt at unifying OS and Mobile UIs? I think Windows 10 uses this new framework and I absolutely dislike what I see, specially the entire new configuration system Windows has, compared to Windows 7.
- int_19h 5y agoIt's not easy to write good reflowing UI in WinForms. You have anchors, but they aren't enough for the more complex layouts. And you have actual layouts, but it's a real pain to set up anything non-trivial with them. However, there's also WPF. Which is also kinda in the same spot in terms of support and future development, but it's a lot more modern and flexible compared to WinForms. As for MFC, the main reason why it's such a pain is because it's a relatively thin abstraction layer over Win32, and it doesn't even try to hide most of that underlying complexity (or limitations)
- coldacid 5y agoMFC was sustainable?
- aoetalks 5y agoAgree the UI story has been rough. .NET MAUI seems promising, yes? Outside of JavaScript, what other (good) multi platform UI frameworks are out there? And I’m hesitant to call JS good, with the amount of slow, laggy, resource intensive apps I’ve come across.
- ocdtrekkie 5y ago.NET MAUI seems promising unless you're a VB developer.
- tonyedgecombe 5y agoThe writing has been on the wall for VB.Net for a long time now.
- ocdtrekkie 5y agoOnly due to mismanagement and apathy by Microsoft. It could and should be as popular as Python is today.
- quickthrower2 5y agoWhy not just learn C#? Same framework, tooling, target, libraries etc, just a different syntax.
- ocdtrekkie 5y agoI know C#, and I've worked in it. I prefer VB. (To be specific, beyond language differences, VB's app platform is inherently faster to work in, a lot of it is just built-in that take a lot of scaffolding to replicate in C#. You'd be surprised how much of VB isn't directly available to C# developers.)
- scns 5y agoShould be possible to write fast Electron apps with Svelte, Solid or maybe Imba no?
- 5y ago
- whoknowswhat11 5y agoCouldn't agree more. Microsoft lost their minds on the UI / desktop app side - which was a core strength (historically). WinForms was fine / great / amazing. 90% of business / line apps could be handled with it. I have no idea how / why it's taken them so long and they STILL have not gotten their replacement story straight for it and they regressed the designer in .NET. Did they just lose their minds there? Hire a bunch of idiots caught up in fads instead of folks who've been around for a bit. It honestly is mind blowing. By now they could have had a cross platform WinForms story or something. The new WinForms designer is so annoying at times. "Oh, we support winforms" - no you don't. And pretty much the stuff after it has been garbage.
- olau 5y agoUI component design is extremely difficult. It's at the intersection between UI design and API design, both difficult disciplines in themselves. It doesn't help that it has traditionally been mired in OO hype sauce.
- tralarpa 5y ago> UI component design is extremely difficult I don't see much difference between UIs of today and 20 years ago. Actually, I think UIs are nowadays less complex (more screen space available; and you have to worry less about CPU consumption). One would except that was enough time to figure out component design.
- throw_m239339 5y ago> I don't see much difference between UIs of today and 20 years ago. Actually, I think UIs are nowadays less complex (more screen space available; and you have to worry less about CPU consumption). One would except that was enough time to figure out component design. Today, UI need to be responsive, because of all the different screen resolutions and formats and form factors. That wasn't really the case 20 years ago.
- throw_m239339 5y agoYes, UI library design is hard because it a series of trade-offs one has to make when designing the API. Make the API too customizable and it's a horror to use with horrible performances, make the API to rigid and people will complain it's hard to customize. WinForm is far easier to use than WPF... except that WinForm makes creating custom components a pain. WPF is easy to customize... except that it performs worse than WinForm, this isn't even up to debate... But also, all these moving parts are why a lot of developers chose to go with Web techs for their UI, for better or worse.
- dgellow 5y agoWhat are you talking about? WPF is still supported and a viable way to implement UI components. Same for WinForms. UWP never replaced them. What they are doing with WinApp SDK and WinUI is to extract features that were packaged with UWP to make them available to any type of Windows application. Xamarin is also still a thing, MAUI will be a thing in the future, Uno is another option, Avalon too. There is a lot of options for .Net GUI, most of them are mature and maintained.
- pjmlp 5y agoWhile true in spirit, the GitHub and developer voice tickets kind of show the actual state of affairs, which kind of saddens me. It feels like desktop teams are running into all possible solutions to see what sticks, instead of fixing what we had.
- dgellow 5y agoI would agree with your last sentence, that's a very Microsoft way to handle things: "Hey, look at all of this! You can implement your application USING YOUR FAVORITE TOOLS! Isn't that great that we give you the opportunity to evaluate 36 different framework to see which one is THE BEST for your UNIQUE situation?!". It's a complete mess and the whole thing feels direction-less but I cannot agree that no good tool exist to implement GUI. I'm still confused by their React Native for Windows. Very happy to see development in this area, React Native is a fantastic framework, but I cannot understand if it is a toy or something they actually want to commit too. Blazor Desktop is also really confusing and makes no sense IMHO.
- ripley12 5y agoBlazor Desktop makes a lot of sense to me. Basically: Blazor Server is getting pretty good and it’s easy to serve it up to a local webview so why not make that an officially supported use case?
- JamesSwift 5y agoYes, I want to believe in MAUI but the current state and dev process are very concerning. I don't get a good feeling that theres a clear understanding of how Xamarin "failed" (which it had to at some level for it to be replaced) in order to avoid the same issues. I'm also really concerned how soon the cutover is supposed to be (with only 1 year of Xamarin support after) and the current state of MAUI.
- jrsj 5y agoAs far as UI in .NET in general goes they seem to be throwing stuff at the wall to see what sticks, and no one project seems to have a lot of resources dedicated to it. I imagine this is because it’s simply not a priority for the .NET team. Maybe it’s undervalued a bit, or maybe it’s making the best with the resources they have.
- pjmlp 5y agoAs I mentioned in another comments, I feel that they disbanded everyone as of Windows 8 and UWP, as many businesses did not follow along, they were forced to reboot Forms and WPF teams. Then you now have Blazor trying to be everywhere, with Xamarin being redone as MAUI (you are expected to rewrite your Xamarin code). So not so rosy for the time being.
- ripley12 5y agoFor what it’s worth, WPF and WinUI are owned by the Windows team not .NET. I suspect it’s less “not a priority” and more “building a good cross-platform UI framework is a colossal amount of work”.
- Anon4Now 5y ago"Azure, Azure, Azure!" is the new "Developers, Developers, Developers!". Microsoft is going to focus where the business growth is, and I'm guessing they don't see improving desktop development as a big money maker for them.
- ygra 5y ago> Not to mention that porting WinForms from .NET Framework to .NET 6 requires a rewrite for anything more complex than a Hello World. We sell a fairly complex custom control, both for Windows Forms and WPF. There were zero changes necessary for the migration to .NET Core 3 back then. We still build both .NET Framework and .NET Core assemblies from exactly the same source. Depending on how many 3rd-party dependencies are used and what other weirdnesses one does in code there may well be projects that are impossible or really hard to convert. But overall my experience was that for a lot of applications there are few, if any, changes necessary.
- skc 5y agoSign of the times. In the last 5 or so years working as a consultant for large corporates I can't recall ever having to work on new desktop app/features. Everything is moving to the web even for internal uses so I'm not surprised that desktop app dev frameworks are collateral damage somewhat.
- zip1234 5y agoWindows Forms and WPF both work with .NET 6. They only work on Windows right now though.
- phillipcarter 5y agoHonestly, I don't know why anyone would want to write Windows desktop apps anymore. The browser is the ultimate UI platform and you can do incredible things with it that will work outside of Windows too.
- ripley12 5y agoA huge part of .NET's value proposition is that you can do things that aren't possible inside the browser sandbox, and it's nice to be able to build UIs on top of that. I don't care if my UI ultimately gets rendered by a browser engine, but as things currently stand UIs that were relatively easy to build in WinForms/WPF/UWP are a bit of a pain with Blazor and friends. (and yes, I'm aware of F# and SAFE but every time I try to get started with F# I run into too many tooling issues)
- phillipcarter 5y agoI'm definitely a fan of SAFE, but also it's not hard to discount just regular 'ole JS/TS talking to a .NET backend. There's an incredible array of ecosystem libraries and tools that are much more mature than Blazor.
- ripley12 5y agoY'know, I've been building up my own "regular 'ole JS/TS talking to a .NET backend" solution lately: https://github.com/rgwood/MinimalWebView https://github.com/rgwood/MinimalWebView It's nice and lightweight but the friction of .NET-JS interop is constant. Blazor Server (hosted in-proc and served up to WebView2) is the nicest solution I've found so far but I'm very open to other suggestions.
- cbsmith 5y agoIt's all about Azure now, which makes for an emphasis on server- side capabilities.