[HN Gopher] WPF Begins Its Long Goodbye
       ___________________________________________________________________
        
       WPF Begins Its Long Goodbye
        
       Author : pjmlp
       Score  : 20 points
       Date   : 2023-03-05 19:58 UTC (3 hours ago)
        
 (HTM) web link (medium.com)
 (TXT) w3m dump (medium.com)
        
       | phillipcarter wrote:
       | I think what this article (and the events it covers) highlights
       | is that WinForms really does knock it out of the park for being a
       | simple way to create forms over data for Windows desktop apps.
        
         | alkonaut wrote:
         | I'd argue WPF is a lot easier even for simple apps. The
         | MVVM/binding story in WinForms is terrible (although
         | interestingly it's been improved very recently).
         | 
         | And the DPI handling alone saves a massive amount of time in
         | WPF over WinForms. Writing everything in device independent
         | size is a godsend.
         | 
         | There are zero sizes or categories of apps where I'd choose
         | WinForms over WPF today.
        
       | etimberg wrote:
       | WPF and XAML are by far the worst tech stack that I've had to
       | work on during my career. It was only for 1 year because my team
       | got added to a massively delayed project, but I still remember
       | the horrors. The node tree could only ever have a few thousand
       | nodes before performance became abysmal so all kinds of
       | workarounds were written.
        
       | galkk wrote:
       | People are saying that wpf was good forgetting that ms has
       | botched it from the start.
       | 
       | First releases had god awful font rendering, that our (.net shop)
       | enterprise customers hated. The things improved only when ms did
       | some parts of visual studio in wpf, if I recall correctly. Also
       | quite bad visual designer. (Even 2! Visual studio's one and there
       | was another software. Blend?)
        
         | jiggawatts wrote:
         | Windows Presentation Foundation had some _shocking_ quality
         | issues that Microsoft outright refused to fix, arguing with
         | customers in support forums that it was "like that by design".
         | 
         | It was. It was broken by design because it was designed for
         | customers, not Microsoft themselves. It was designed to be just
         | complete enough for the "demo" apps in the documentation, and
         | no more.
         | 
         | The most egregious example of this that made me give up on WPF
         | entirely is how they implemented list control _data
         | virtualisation_.
         | 
         | Data virtualisation is when you have a list of 10K table rows
         | and want to render only the 100 rows that's visible on the
         | screen. If a user scrolls through the list, there are only ever
         | a few hundred GUI objects in existence.
         | 
         | In WPF, this interface was an IEnumerable, which meant that the
         | framework was forced to iterate through 9000 items to get to
         | 9001. You could _see_ this as you scrolled down a long list: at
         | some point the FPS would drop and the CPU fans would spin up.
         | 
         | The workaround for this required heroic efforts, something like
         | several thousand lines of code.
         | 
         | Meanwhile a simple C# WinForms app could scroll through 40K
         | rows no sweat.
         | 
         | Microsoft left this in WPF for years and years, telling
         | customers that it's "too hard" to change an established API.
         | 
         | They fixed it the second they had to eat their own dog food
         | when they needed WPF for Visual Studio. You see, the
         | compilation error list can be very long and merely scrolling
         | through it could bring a high-end gaming PC to its knees.
         | 
         | I and many others in the industry decided to never write
         | Windows GUI software ever again.
        
         | dh2022 wrote:
         | The designer was called Blend - it was started by a dev that,
         | among many other things :), created the designer for WinForms.
         | And the hacks they had to make in WPF to support any
         | VisualStudio designer (WPF had to detect if it was running in
         | designer mode and do things differently
         | https://learn.microsoft.com/en-
         | us/dotnet/api/system.componen...)
        
       | dh2022 wrote:
       | What a blast from the past. I used to work on WinForms team at
       | the time WPF appeared. We thought we would get fired or re-
       | assigned to other teams. Tam members ended up re-assigned to
       | other team (by then I already left MSFT). And I remember
       | SilverLight as well and all the promises made - originally
       | Silverlight was lead by a PM from WinForms team.
        
         | warning26 wrote:
         | I definitely remember it being pitched as the future of Windows
         | UIs, while having massive feature gaps, and, perhaps most
         | noticeably, looked blurry and horrible on the standard displays
         | of the era (ie, non HiDPI). Why the engineers thought that it
         | would be a good idea to build a resolution-independent UI with
         | no pixel hinting targeting 96ppi displays is utterly baffling.
         | 
         | Silverlight made _perhaps_ a bit more sense, but it never
         | really stood a chance against the massive install base that
         | Flash had back then.
        
       | torbica wrote:
       | WPF is the best desktop GUI framework for enterprise
       | applications. WPF and Prism with third party contols are still
       | unmatched in terms of productivity. Even good old Delphi or VB6
       | are not coming close.
        
       ___________________________________________________________________
       (page generated 2023-03-05 23:01 UTC)