tags:

views:

430

answers:

5

Hi, I've been developing C# Windows Forms applications for a couple of years and while I've heard and read about WPF I've never really come in close contact to it. With some time to spare this spring I though I'd give it a go though, but first it'd be intresting to know what you guys thought about it. What do you think, is it worth the time to learn for a .NET desktop application developer? There's alot of other cool stuff I'd like to spend some more time with too, so if it's just "fun" and to no practical use I'd rather put my attention elsewhere.

+3  A: 

Yeah, I'd suggest you learn WPF. It has many advantages over WinForms, such as GPU acceleration and easier code reability (XAML).

Plus it looks nice on your CV.

Daniel S
Plus it has a number of architectural improvements over WinForms that make it much easier to structure your programs well. It's not just about the graphics!
itowlson
Any drawbacks on using WPF or is it all just better, compared to winforms?
Erik
You can build things in WinForms without understanding XAML, markup extensions, type converters, dependency properties, routed events, resource dictionaries, data binding, styles, and templates. It's pretty hard to build anything in WPF without understanding most of those. On the other hand, all of those are tools that make for more flexible and robust and performant UIs.
Robert Rossney
I would not out "GPU acceleration" high on the list of advantages! :-O
Schneider
+1  A: 

The rumor at Microsoft is that WPF is a dead-end technology. The future is Silverlight for a number of reasons. For one thing WPF only accepts one "focused control" which doesn't work in a multi-touch environment. Silverlight doesn't have this limitation. So it's not compatible with some of MS's future technologies such as multi-touch portable devices and Microsoft Surface.

Right now WPF is more feature rich, but if it was me and I didn't need something WPF-specific, I would develop for Silverlight. And get the bonus of being able to be embedded on web pages.

Keltex
Can we see a reference for this comment?
benPearce
Surely Microsoft could update WPF to support multi-touch given the investment they've made in it already? Given that Silverlight is largely based on WPF anyway, what makes it so future-proof?
Sam
The two aren't mutually exclusive - *au contraire*. Most of what you learn in WPF can be applied to Silverlight (with a number of infuriating limitations that will hopefully be resolved one day) and vice versa. So when you're learning WPF, you're also learning Silverlight, and vice versa. Even if Microsoft killed WPF tomorrow, any investment in learning WPF would still be valuable in the Silverlight world. And as you say, for now WPF is more feature rich -- it's also more consistent and therefore far easier to learn!
itowlson
Given the fact that VS2010 uses WPF everywhere, I doubt it's a dead-end.
BennyM
I've always had the idea that silverlight was MS version of Flash, which I would certainly be intrested in using when producing flashy websites but hardly for "professional" applications/websites (such as Stackoverflow). Would you really consider using Silverlight when producing enterprise desktop applications where "flashyness" is not required?
Erik
This answer is completely wrong. No one at MS thinks WPF is dead-end. WPF will live for as long as Windows does. WPF will always be there for as long as the "runs best on Windows" mantra exists. WPF will exist for as long as MS are in the thick client proprietary OS business.
Schneider
+2  A: 

Silverlight is a subset of WPF, Silverlight primariliy is focused on animation and media, its not really designed to do complex and large Desktop applications, you could of course but its not its primary purpose.

WPF can be hosted in a webpage and has cross browser support ( IE and Firefox)

I would recommend use and learn WPF, and to a degree this knowledge can be applied to Silverlight later down the track.

And realistically, we are least 2+ years away from having widespread and deployed multi touch screens in the normal persons day to day activities, so a focus on this is worrying about a tiny percentage in the current market.

archeo
I double multi-touch will become an issue for me in the foreseeable future, the applications I develop are considerably more traditional than that. Would you, who I assume know WPF, consider using WPF for a "dull" desktop application (such as a customer-management system) if you were to develop it today?
Erik
Yep I would, I wont pretend its harder and more complex than winforms but WPF/XAML is not going away soon..so in a way its an investment in your future ;)
archeo
+1  A: 

I'm moving all of my application development work out of WinForms and into WPF. Despite a daunting learning curve (for some reason, I've found WPF generally to be harder to learn than any new technology I've come across in the last decade and a half), I'm finding that the more complex the UI is, the better WPF is as a way of implementing it.

Robert Rossney
+1  A: 

is it worth the time to learn for a .NET desktop application developer?

Absolutely! If that is your specific job there is no better technology to learn (as opposed to RIA developer, web developer, java developer etc).

so if it's just "fun" and to no practical use I'd rather put my attention elsewhere.

It is of major practical use if you ever want to write applications for Windows. Any applications... but in particular ones that have a non-standard, skinned or complex UI.

So no, it's not just fun... but it is fun!

Think about it... its Microsofts first ever major graphics / application framework that has been written without any major concessions to the legacy of Win32 ... this means its a radical architectural departure from what has come before, and with that comes great benefits.

My only warning is it can take a while to get your head around it

Schneider