I am wondering if WPF will fit in my case:

We want to refactor an old legacy application written in a 4GL language with about 1500 forms\dialogs. We want to do that in .Net (desktop application), now we have to consider using WinForms or WPF to accomplish that.

From my point of view, WinForms fits better because the UI is more "data driven" than "Fancy UI driven". For developers it is easier to create such dialogs using WinForms, instead of dealing with XAML and\or Blend in terms of producitivty. E. g. the WinForms Designer in Visaul Studio is more intuitive. But maybe that's, cause I am an old WinForms developer.

What do you think? Do you have "pros" (or "cons") to use WPF for a large ERP desktop applications?

  • Well, WPF works quite well for the Visual Studio and Blend. Your third paragraph does not make any sense whatsoever. – Den Dec 11 '14 at 9:47
  • recommended reading: What is the problem with “Pros and Cons”? – gnat Dec 11 '14 at 12:29
  • 3
    it scares me that someone tasked with rewriting a massive system needs to ask this question here. – ozz Dec 11 '14 at 14:20
  • @jmo21: You're more than halfway there if you have an already-existing model to work from. – Robert Harvey Dec 11 '14 at 14:45
  • 2
    To the OP: Your question would be a better one if we knew what you meant by "data-driven." Is it your perception that Winforms is a closer "cultural fit" to the existing 4GL application? Also, with an application this large, I could see the potential for substantial gains being had by code-generating some or all of the new forms. – Robert Harvey Dec 11 '14 at 14:49

WPF has fantastic data binding. XAML is a wonderful declarative syntax for describing component layout. WPF/XAML excels at data-driven GUI.

I see no technical benefit of using WinForms over WPF/XAML.

However WPF/XAML will require a recent version of Visual Studio and a time investment to learn the new API. I strongly recommend writing XAML by hand rather than trying to use any sort of WSYWIG tool. (Designers can use Blend, but programmers should take that design and convert that to the final XAML code). You will have more control and get better results, and be able to develop much faster once you've practiced a bit.

| improve this answer | |
  • While WinForms is obsolete, I would say that XAML is half-baked and actually rather awful; as somebody put it, it makes the hard trivial and the trivial hard : ) And what's worse, it is not improving: paulstovell.com/blog/six-years-of-wpf – Konrad Morawski Dec 11 '14 at 15:03
  • @KonradMorawski You entitled to your opinion, of course, but it sounds a bit exaggerated. Paul Stovell's criticism is weak and superficial. I have found XAML far easier to work with and no more verbose than imperative GUI toolkits like Swing, Qt, and WinForms. I have not tried JavaFX or QML so I can't make any fair comparisons there though. – M. Dudley Dec 11 '14 at 15:25
  • +1 for the last paragraph. WPF has a HUGE learning curve but once you learn it, it is far easier and quicker to develop the screens with the exact layout that you want versus WinForms. – Dunk Dec 11 '14 at 19:24
  • @M.Dudley we can agree to disagree. I worked with WPF for three years; I could never get over how needlessly complicated it is, or its use of magic strings (resulting in lack of type safety and weirdest exceptions), or having to repaste the whole control template to modify the view of a standard control, or... Paul Stovell doesn't really have a monopoly to notice these shortcomings. That's just one example: stackoverflow.com/a/4120034/168719 - see the title of the question and what the highest voted answer is :) I said it all in my comment below it. – Konrad Morawski Dec 12 '14 at 12:23

You can do WinForms-like development quite easily in WPF. WPF was actually designed to be easy to use for WinForms developers. You don't have to do anything with DataBinding or MVVM, you can have everything in code-behind. Not that I agree with this approach.

But if you leverage full power of WPF and do it properly, it will give you tons of productivity boosts through DataBindings and MVVM. But this requires discipline and focus on separation of concerns. And when you talk about WPF being "Fancy UI driven", then I can hardly see that happening.

| improve this answer | |
  • I don't understand your last sentence. Casual observation of typical WPF interfaces seems to suggest that "fancier" solutions can be obtained much more readily in WPF than Winforms. – Robert Harvey Dec 11 '14 at 14:44
  • @RobertHarvey I understood his "Fancy UI driven" as critique of WPF being better for creating "fancier" UI than actually useful UI for data-manipulation. And while I agree that this might be correct first impression, it is quite shallow one. Especially considering he is asking us to make decision that would cost him a lot in the long run if done wrong. – Euphoric Dec 11 '14 at 14:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.