Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is WPF a good choice for developing line of business user interfaces? [closed]

Tags:

c#

winforms

wpf

We're debating whether our future Windows UI development should be WinForms or WPF. How have some of you made this decision? Most of our applications are LOB applications, and I'm not sure I see a clear and overwhelming benefit to WPF for these types of applications. However, my knowledge of WPF is limited. I'm also a little concerned that WPF will be in vogue for another couple years and then Microsoft will get tired of it and push something else on us. I guess one argument against this is the fact that Visual Studio 2010 is a WPF application.

Thanks.

like image 375
Randy Minder Avatar asked Mar 20 '10 21:03

Randy Minder


People also ask

Do companies still use WPF?

Yes. WPF is probably still the best technology out there for building Desktop Applications. It is extremely powerful for creating any PC business based application and there are businesses that still use applications that were written in this technology.

What is the advantage of using WPF?

WPF's BenefitsCreate your own UI controls with limitless possibilities and flexibility. In a multi-resolution setting, scalability is beneficial. Reusability of code. Controls with highly efficient and powerful data-binding capabilities.

Does WPF have a future?

Now this is a big thing coming from Microsoft where it is making a move from WPF to . NET Core. This move clearly explains that Microsoft sees a future in WPF and considers it as a UI framework for the . NET platform.

What is replacing WPF?

Universal Windows Platform. Both Windows Forms and WPF are old, and Microsoft is pointing developers towards its Universal Windows Platform (UWP) instead. UWP is an evolution of the new application platform introduced in Windows 8 in 2012.


2 Answers

There are a lot of factors to consider here.

Reasons not to choose WPF:

  • It currently has less support than WinForms for common LOB controls like date pickers, numeric entry widgets, and so on, though this is improving via the WPF Toolkit, in WPF 4 and through third party control vendors.
  • The tooling isn't fit to kiss the Windows Forms designer's boots. (Though to be fair this is partly because the tooling has to cope with much more sophisticated ways of constructing views. And Blend is definitely getting there.)
  • A very different mental model to Windows Forms. To get real benefits out of WPF, you need to think in a very different way to what you're used to. So there may be a substantial learning curve -- not just in terms of learning the technology, but in terms of internalising the idioms and patterns (though there are now a lot more community resources around idiomatic WPF than there used to be).

Reasons to choose WPF:

  • Decent architectural support. WPF (if you do it right) has a decent separation of code and UI built in, making WPF applications much easier to test and to evolve.
  • Greater flexibility. For example, if you need a simple map display, you can build it in a couple of hours from a ListBox, instead of having to research and purchase a third party component or write a map control from the ground up. Simple data visualisation is a killer feature for WPF.
  • WinForms is a dead end. It's not going to see any enhancements from Microsoft, and control vendors are already beginning to shift to WPF as the WinForms market saturates.
  • Most of your WPF experience can be ported to Silverlight, which (a) gives you flexibility to bring your apps to the browser and the phone, and (b) gives you additional confidence that Microsoft won't lose interest -- even if they do get "tired" of WPF, they've shown a very strong commitment to Silverlight.

Personally, if I were starting a Windows desktop app now, I would choose WPF. However, I've already climbed the learning curve. For a team that doesn't have WPF experience, the cost of taking it on must be a greater factor than it is for me.

like image 174
itowlson Avatar answered Sep 21 '22 19:09

itowlson


One thing to bear in mind is Silverlight. Is it possible that you'll want to write your application to be run from a browser in the future, or possibly even from a Windows Phone 7 device? While Silverlight and WPF aren't quite the same, they're extremely similar. This would be my primary "future-proofing" argument in favour of WPF.

Personally I like the composition model of WPF - as well as a declarative way of representing the UI, and a better layout system than WinForms. Not that I'm a UI guy, really.

like image 22
Jon Skeet Avatar answered Sep 19 '22 19:09

Jon Skeet