Hacker News new | past | comments | ask | show | jobs | submit login
WPF will be community run project (twitter.com/dotmorten)
52 points by philonoist on Dec 17, 2022 | hide | past | favorite | 49 comments



I remember when I wanted to get into C# desktop app development years ago and it was either WinForms or the newer WPF. I chose WPF and it took a while to get a hang of it (mostly I had to either import some libraries or create some common ones to handle variable updates through UI bindings). Unfortunately, WPF always felt unfinished and missing many QoL features. I was hoping they would further refine and make it easier to work with but I guess it was never meant to be.

Windows 10 was coming around corner with UWP being pushed as the big desktop app SDK. Then they ditched that because people just didn't like Windows Store and how they did the apps on it (I also wasn't big fan of it). Then everything went to extremely resource-hungry Electron. Now there is .NET MAUI and and some general WinUI framework [1].

I am utterly confused what is happening with UI development on Windows ecosystem. On rare occasion I want to develop desktop app, I have used Avalonia UI [2] which seems to be something more stable than what MSFT churns out every year or two, can highly recommend that.

Either way, they are really destroying Windows ecosystem by pushing out new framework every few years that always feels half-finished before they move on to the next one. This is, of course, on top of Windows versions in general with how they pile new half-finished UI reworks that just keeps piling on insane amounts of technical debt and legacy for future maintenance.

[1] https://learn.microsoft.com/en-us/windows/apps/winui/ [2] https://avaloniaui.net/


This exactly mirrors my experience. I got started just before WPF came around. I felt pretty confident with winforms, and did eventually sink enough time to get good at WPF. But WPF was never really fleshed out, it was missing so many features, and I ended up re-creating several winforms controls that just no longer existed.

Then I stepped away from UI development for a few years. When I came back, WPF was in exactly the same state I left it, but we also had UWP.

I made one UWP app and decided to fully abandon Microsoft.

Microsoft is doing the same thing to the runtime, too. How many different versions of dotnet are there? Which one do you need? Are they interoperable?

I tried to build a little WPF tool as an internal widget at work. In total, there's five checkboxes, two textboxes, six combo boxes, a console shoved into a text panel, and a button. No textures or assets. I attempted to build it as a single executable for convenience.

What I got was a 140MB exe and a half dozen dlls.

Now I've decided to abandon C# entirely and move to something less awful. C# was my first real programming language, and it's always been the first thing I go to, but between Microsoft going downhill and all the technical issues, it would be less effort to learn Rust than to ever open visual studio again


> Microsoft is doing the same thing to the runtime, too. How many different versions of dotnet are there? Which one do you need? Are they interoperable?

Easy, .NET Framework is the Python 2 of the .NET world.

.NET Core, renamed to just .NET as of .NET 5, is the Python 3 of the .NET world.

Xamarin (mono), matters mostly when targeting iOS or Android, and some parts of it were used in Blazor AOT compilation infrastructure.

MDIL runtime was only for Windows 8.x, while .NET Native is only for Windows 10 UWP workloads.

Unity uses mono for interactive development, IL2CPP for production deployments, and the HPC# subset with Burst compiler for DOTS.

Yes there are plenty, but so there are C, C++, Java, Python, Ruby,.... implementations.


This wouldn't be so bad if each version of the framework supported the same features.

What really killed the appeal of C# and windows was my recent experiences with Bluetooth. My job is building what is basically a Bluetooth game controller. The options on windows are the C++ WinRT library, a wrapper around that library in your chosen language, or the UWP libraries (which I suspect are still just WinRT).

I started building a dll to handle the UWP functions so that I could use them from our other infrastructure. But no, a UWP library can only be referenced by a UWP application. The alternative is to run it through IL2CPP, which is where I gave up.

I really enjoy C# as a language, but I'm so goddamn sick of Microsoft that it isn't fun to use anymore.


Or use DirectX APIs...


> Microsoft is doing the same thing to the runtime, too. How many different versions of dotnet are there? Which one do you need? Are they interoperable?

Yeah they really made a mess of that a few years ago, but it's sorted out now. As of .NET 5.0 it's just .NET, no more core or framework.


> I am utterly confused what is happening with UI development on Windows ecosystem.

As you said MS is all in with React based development for UI nowadays. I read somewhere that new versions of Office 365 applications would be in React.


> I read somewhere that new versions of Office 365 applications would be in React.

I'll believe that when I see it. I think performance is too important to do vdom reconciliation on every keystroke.


Asking corporates and individuals to upgrade computers is simpler than fixing performance issues.

Many seem to be under the impression that there is thriving, competitive market for top rated UI frameworks. But I feel, in reality it is just Electron or bust. So even if laggards (like me) whine about crappy electron apps it is not like people who matter are going to listen and do something about it.


You can try to cross check it on browser developer tooling.


Never heard of Avalonia before but Win development is a solved problem in the form of Electron. No, seriously. Microsoft's own frameworks are in various states of limbo and increasingly confusing to get started with.


Like Google with messenger apps. Apple destroys the competition in both UI libs and messaging because they pick a product and polish it.


As an early winForms developer how the hell did Microsoft lose its way so badly in terms of building an app on windows?

Almost anyone could build a data bound app ages ago - then they burnt this all on a WPF / UPF / silver light etc bonfire.

Back to the electron apps I go


Microsoft steadily replaced their staff with increasingly dumber and more complaint developers. I was shocked with how bad it was when I worked there and I’ve only seen it get worse since. A lot of the damage was done by Steven Sinofsky and his vicious war with Dev Div.

People wonder why the company hasn’t failed yet, it’s due to the incredible power of inertia. But even inertia runs out eventually - it’s a slow process but it is happening.


Now Dev Div feels like it's been divested. Since the last year I've been thinking its time to go for me too, but I still have a few dependencies.


Lobbying (bribing?) politicians is why they won't fail. They are like IBM, MS wouldn't hesitate to collaborate with Nazis if they have to. They surveil population on behalf of governments, existence of Windows 10 China Government Edition is evidence to why all Windows is essentially spyware.


I don’t disagree but I would consider MS turning into the modern day IBM to be a failure.


Yeah it’s pretty surprising that traditional desktop apps is currently the weakest part of the .NET ecosystem.

They recently launched MAUI, their new new new cross platform UI framework and it feels very unfinished and “rushed out the door”. Meanwhile they are announcing end of life dates for what MAUI supposedly replaces (eg Xamarin).

So the choice currently is a promising but very unfinished brand new cross platform UI framework - which I would argue is entirely not production ready - or the old approach which now has a ticking expiration clock on it.

I too end up back on Electron by default at the moment.


Because development firms don’t want to invest everything in one OS / platform.


visual studio = WPF app


what do you mean? you still can


In the same way that you can still build visual basic apps. They didn't choose an ecosystem to keep supported and let all of their ui frameworks deprecate.


I recently built a brand new internal GUI tool in WPF. It wasn't bad but it has a few sharp edges:

- documentation is lacking

- open popups overlay EVERYTHING even windows from other applications

- no easy way to create a component with a XAML template

- no way to set dimensions to a proportion of the parent dimension


> no way to set dimensions to a proportion of the parent dimension

Grid's rows and columns are proportional. Or do you mean something else?


I meant something else. In this case I wanted to set the margin property of an element to a certain % of the parent.


"Community run" is code for dead. See ChakraCore as an example.


Chakra was not really ever used outside of Edge. WPF is widespread.


Been working on a legacy WPF project recently.

C# has been pretty great to work with. (Updating from framework to NET 6 has been a slog though)

Anything to do with the WPF and the UI just seems way too complicated. I can 100% understand why electron has taken over.

Keeping my eye on blazor for desktop as I think that would be ideal.


> Anything to do with the WPF and the UI just seems way too complicated. I can 100% understand why electron has taken over.

I've found that doing WPF well requires very careful setup of your architecture.

My biggest piece of advice; unless it's a simple CRUD app learn how to use the Dispatcher and pick how you want to handle background work. Especially if you're doing anything like WebSockets/SignalR.

In my case I was on a deadline so I just pulled Akka.Net in and set up an actor to handle outbound and an actor to handle inbound. It made things -so- much easier to reason about, even if it was a bit of a 'bulldozer making a sand-castle' moment. OTOH it did also make the UI much more responsive so I have no regrets.

WPF had some nice points. My first WPF app was actually a simple 'form' that field workers could use to fill out pole survey data. They'd send the files back to us, we could load the data in, finalize/check it... then run some funky flow that saved the screen as an XPF before converting to PDF. the 'fanciest' thing it did was look up a google maps image for a lat/lon and add it in.

But when I tried to convert all of my existing winforms stuff to WPF (Fun tools that used COM to talk to CAD programs) It was a living nightmare and I gave up pretty quick (The winforms stuff worked, it worked well, and at the time WPF had caching issues that caused long cold starts anyway.)

Hopefully Blazor works out. I'm hoping the internal inertia at Microsoft is in that direction (i.e. I think theres rumblings about Office moving to React, but perhaps Blazor would be a better option, I think it would be great for PowerApps.)

But really, Microsoft lost the plot somewhere after VS2010 on Desktop/Productivity building.

Workflow Foundation is a good example. Frankly, it was pretty powerful as far as what it could do, But it was clunky as hell, slow, and the overall API needed a good spit and shine (perhaps an easy way to do things in a more declarative way via code.)

Come and think of it the time after that was when it became obvious Microsoft's lunch was starting to get eaten by Python, Ruby, and JVM ORMs, to say nothing of everything happening on the mobile side and the implications for devshare. (To be clear; I'm a Windows Phone apologist, Ironically the platform had a great focus on app-level privacy and sandboxing compared to competition. But it, like WinUI, stole resources from more 'global' solutions.)

So it got quietly pushed to the side, used by others with the time to build some cool things (SSIS packages are similar in concept and somewhat workable,) and inspired/powered a wave of overpriced low/no code tools.


Now that the standard GUI framework for Windows apps is Electron, there is no point in spending resources on legacy WPF.

Much better investing that time in the actual tools that devs use, VS Code and Chromium.


If there is one sin here it's that Microsoft waited so long to do so while giving it little to no care in the meantime.

AvaloniaUI and Uno have been around for YEARS now, and could have used this announcement earlier to get more inertia behind them.


Is this a generational problem? They can’t find any younger devs willing to work on WPF?


Actually they can, that is the problem, all Windows UI frameworks suffer from the same issues that plagued IE, everyone moved on and the new intern's don't have any idea.

You see this in several community talks, where .NET old timers ask about feature X in framework Y being available on framework Z, and many times they don't really understand what is being talked about.

Most Microsoft veterans are now on Azure or Windows Server business units.


Ow wow. Since you are a bit in the know, do you think wpf might start a new life on Linux as it gets opened? Xaml wasn't bad.


I’d like to see it get merged into AvaloniaUI which is already cross platform and built by smart people with experience.


Besides Avalonia, there is Uno as well. The difference being Avalonia uses WPF XAML, whereas Uno uses UWP/WinUI XAML.

However they are community projects.

From Microsoft, maybe MAUI one day gets to support Linux, which again, uses its own XAML flavour due to its Xamarin origins.


Thank you. I get the feeling that MS is not too interested in the desktop at all though.

I can see the money is in the cloud and I don't complain from my KDE desktop, but from a distance it looks quite radical to see them throw their crown jewels into the river.


> I get the feeling that MS is not too interested in the desktop at all though.

It hasn't served them well with WinUI (I tried it, but the versioning hell was too much.)

That said, They over-compensated for over-focusing on desktop pre 2012ish.

And now, they are acting completely silly in regards to MAUI (supporting Windows, Android, iOS, macOS, but -not- linux)


Not just younger devs. I am an older dev who has extensive experience with WPF and was relieved when I moved on to another stack. Having worked with winforms extensively wpf sucks on every level. Xaml is an atrocity that should not exist. Please Microsoft abandon xaml and back fully another established framework like react native for windows.


Interestingly, my experience is totally different. I loved working with XAML and C# for building Silverlight apps, and would have preferred using that across more platforms. Especially with a nice editor like Expression Bland that got folded into VS.


Totally had your experience as well. I thought that the bridge between XAML and the underlying object model was pretty rad.

There were quite some rough edges, especially surrounding dependency properties. Those had way too much boilerplate. Also their hip new event system needed some fine tuning too.


I had an interviewer ask me about my WPF experience in 2018. I told them I don't believe in the technology since everything went towards HTML/CSS/JS. Looks like I was right. You couldn't honestly pay me enough to touch WPF in 2023. I remember burning out on making WPF look decent and like a web ui back in 2016. The dual way databinding is awesome, but XAML can't and will never reach the maturity of HTML and CSS. They sent me a contract with a bad salary, I didn't accept it. I hope beginners stick to the web.


No, it's not a generational thing. WPF hasn't had significant feature updates in the last 10 years, because MS abandoned it in favour of UWP.

I wrote a bit about this recently: https://www.reillywood.com/blog/windows-ui-frameworks/


Just look for older devs then.


older devs are more expensive


Exactly - pay top dollar for crud forms makes no sense just for them to be written in wpf…. Hello JavaScript


Younger devs didn't care about spending a few months learning to build efficient desktop applications.


Also, all the college classes and the bootcamps for programming are geared towards webdev. Skipping the largest desktop platform in the world with 80% market share, and 38% share overall for all OSes both mobile and desktop.


Everything is a service now, ownership of software doesn't exist outside of forced arbitration through terms of service.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: