3 ms·
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
by holbrad 4y ago
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.
- to11mtm 4y ago> 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.