views:

326

answers:

9

I just completed two WinForm applications as part of an intensive course. Just wondering about the technology overall... should I move onto something new, or is WinForms still viable for the future?

+2  A: 

It all depends on where you work and what you work on.

If you manage to get a job where they're developing something new then the answer would be "no" as I would hope that they would be using WPF or Silverlight.

If, however, you get a job where they're supporting an existing application then the answer would be "yes" - even if they're converting it as you will be supporting the old application for quite a while.

ChrisF
+2  A: 

I would say that WinForms are good to know, but I would invest more time into WPF. WPF has similarities with Silverlight and that would give you more of a foundation to work off of.

That being said, it never hurts to learn more :)

ChronoPositron
+2  A: 

Both technologies have their strenghs and weakness.

You can do some real complex controls with WPF, however, some simple tasks are harder to do. For example, treeviews in WPF can be formated as you want them to be with some work, but the simple things like the dotted lines between items are not present by default and are really difficults to make it work (never been able to so far).

Whatever the case, since WPF, XAML and all other related technologies are pure Microsoft products, language like Delphi and other might takes time before using those, so Winform are bound to stay, at least for some years.

I know both and I use both depending of the project I do. I must admit that I prefer WPF for most project though.

David Brunelle
+1  A: 

Well if you are awesome with colours and user experience :) WPF is for you.

If on the other hand you are like me and you can only recognize 8-bit colours :P you will find yourself using WinForms a lot. It has this advantage over WPF that you can crank application without thinking to much about UI - and it will still be usable and look good.

WPF gives you great power, and with great power comes great responsibility.

kyrisu
I'de give -1 for the tacky comment but hey, it'de cost me rep too :)
David Brunelle
Good the system works this way :P P.S. My comment comes from personal experience. I'm usually working alone. There's no good and cheap WPF themes out there. Last time I was trying to make my app pretty I have lost 3 hours customizing stuff. The entire logic for the app took just 1 hour. I would be better off with WinForms in the first place. WPF is great if you have an eye for colors, good themes or a designer. If you just want to quickly write functional software - at least at the moment WinForms are very useful.
kyrisu
+1  A: 

It requires a very small amount of time to learn, so I think it is really worth it. The pattern which WinForms uses is also in use by many other frameworks, so you won't lose anything by learning it.

And also, WPF is perhaps easier if you have some basis.

Venemo
+1  A: 

I would say if your just starting out, WPF is probably what to focus your energies on. That said, I'm currently working on a Winforms project, and started 2 new ones in the past year, and it works just fine.

Jeremy
+5  A: 

Familiarity with WinForms will help you. Legacy applications will use them, and if you work in a microsoft shop, you will come across legacy applications. You should also learn something newer, because that's just part of being a programmer. The things you know now are just the foundation for what you will know. Never stop learning or you'll end up like the stapler guy in Office Space.

Audie
You meant "there (probably) will be a time some years in the future when WinForms applications will be considered as legacy applications".
Doc Brown
+6  A: 

I would say that Windows Forms is great for form-driven applications. WPF/Silverlight is great for animation and graphic-driven applications.

If you need to do some utility work or make a tool, I don't see why Win Forms can't serve that purpose. WPF might be overkill unless you really want it to look pretty. Plus with WPF you have to learn XAML which isn't as easy or intuitive as working with Win Forms designer.

If you are a web developer or designer, working in WPF might seem more similar to designing a web page because you work in XAML and have fine-grain control over the interface.

WPF/Silverlight also have excellent data binding capabilities, plus Silverlight can be run out of browser, so it might even be advantageous to skip WPF for the first version and do a Silverlight version. SL to WPF is much, much easier to port than WPF to SL (since SL is a subset of WPF).

For my project I am working on, it will be done only in SL4 because of the ability to run it out of browser as if it was a desktop app, eliminating the need to port it to WPF. Installing a Silverlight app onto a user's computer is simple, straightforward, and gives you an added benefit of using all your existing code and automatic updating.

subkamran
Just curious... Can a silverlight APP run on mac/os?
RedEye
@RedEye Yes. We have a Silverlight app in final beta that's been tested on Safari (both PC and Mac) as well as Chrome, IE, FF, etc. on the PC. Works great.
Michael Todd
Thats cool. Thanks Michael.
RedEye
+1  A: 

In addtion of all that has been said, I think that some knowledge of winforms is always useful to create small toy applications, or throw away, that kind of stuff.

Daniel Dolz
perhaps a quick and easy way to prototype something?
RedEye