Winforms vs WPF

Joined
Jan 9, 2015
Messages
63
Reaction score
0
Hi there.

Me again, throwing vague questions out there.

If you were developing a Windows app today which would you use and why?

*must support Win 7 and preferably Win XP as well
*UI doesn't need to be fancy, just very functional
*computers will likely be entry level
*connecting to MS SQL db
*performance top priority

I'd guess we are planning on using the app for the next 5 - 8 years. A few months ago everyone was saying WPF is dead but it seems like there is a bit of a revival going on.

Web is not being considered for this project.

Thanks.
 
I tried WPF and went back to WinForms. WPF is just to bloated for simple apps for me.
 
I'm in two minds around this answer.

If you don't have WPF experience, and don't have time to problem solve... stick to Winforms.

That being said, I won't develop another winform app as long as I live though. That's only because I have been working with WPF since 2008, and have built UI intensive applications that needed to be highly performant at the same time. It took a long time to figure out where WPF lacks in performance out of the box (many many places).

The ability to build proper MVVM applications and utilize the really impressive databinding engine within WPF is a massive win... even in LOB applications. The flexibility is insane.

There is very little to no performance gain in Winforms if you have built the WPF app in the right way... but... it takes a lot of research to get it to that point.

Case in point... take a grid and throw thousands of items into it. In WPF, if you aren't recycling containers with virtualization (reusing item containers) and using async calls to fetch sets of results as you scroll, you will end up thinking that adding lots of items to a grid is just impossible. Make those changes however, and it it stupid fast.

These are things that you would have thought they would build into the framework out of the box...

There is a massive learning curve and there are many UI performance traps if you don't know your way around it. If you take the time however, you can build some impressive software.


From a WPF point of view:

*must support Win 7 and preferably Win XP as well
This will depend on the .Net framework you use. XP doesn't support framework 4.5 as far as I know.

*UI doesn't need to be fancy, just very functional
Plug in a standard theme (mahapps comes to mind) and off you go

*computers will likely be entry level
Started using WPF in 2008... it was released in 2005... it runs on old hardware without issue

*connecting to MS SQL db
Do difference... the same data libraries are used.

*performance top priority
Don't go wild on themes / make sure you virtualise containers / async data calls and dispatch the results back onto the UI thread when ready to prevent locking up.
 
Last edited:
Nothing wrong with Winforms. My applications can look like WPF with some tweaking from WF without the extra effort. I still like WPF though.

And as to XP.... EOL dude. EOL.
 
I'm in two minds around this answer.


The ability to build proper MVVM applications and utilize the really impressive databinding engine within WPF is a massive win... even in LOB applications. The flexibility is insane.

Sure WPF has more flexibility in terms of the tweaks you can make but in all my WF apps I also use MVVM pattern. The form-behind code is purely setting up databinding to the underlying viewmodel. Much cleaner than all the event handlers in the code
 
Winforms unless you have devs that understand and have experience in WPF. WPF, if done correctly, has the advantage of being less messy over the long term and once you get the hang of it it's actually very easy.
 
I'm not a .net developer as yet - will venture into the territory at some point. That said, I do know some differences between the two - I would naturally say WF; it just feels more native and functional (which, I guess, is what it's supposed to do).

Just my 0.25 cents.
 
Once you know WPF it will be the quickest to develop and easiest to maintain in my opinion.
 
Top
Sign up to the MyBroadband newsletter
X