tags:

views:

374

answers:

8

Hello,

I'm about to start developing a small Windows application using Microsoft Visual C# 2008 (Express edition). I'm very new to C# and .NET, so this is a newbie question. Should I start with WPF or should I stick with the old WinForms?

My application has several screens, all having several text-boxes, check-boxes, combo-boxes, not anything more. The application will retrieve data from several COM objects, and communicate through standard TCP/IP sockets, both of which are unrelated to the UI.

The UI is not fancy in any way (and I don't need it to be). However, the world seems to be moving to WPF. What are the considerations of choosing WPF over WinForms for my case? What's the recommended approach?

Thanks

+3  A: 
  • WPF = Future + Fancy stuff
  • WinForms = WYSIWYG greatness

Choose whichever of the above you find the most atractive :)

cwap
+3  A: 

It depends. Stick with WinForms if you're comfortable with it.

If you want to be able to have a better look-and-feel with more customized controls, and you're willing to spend the time to learn XAML and the differences between WPF and WinForms, then go for it. But expect it to take some time, there is a learning curve.

Will Eddins
+4  A: 

I have not used Forms enough to say anything about which is better, but I have found WPF to be easy enough to use for minor applications. I figure that if it's the standard people are moving towards and it's not difficult, then it's good practice to start using it.

Paul Williams
+1  A: 

It's a trade-off.

You will most likely be more productive starting off in Windows Forms because the programming paradigm is closer to most other UI development libraries you might be familiar with. There are also many libraries of UI control available for WinForms (including ActiveX) that make creation of attractive, functional UI easier. Unfortunately, MS has indicated that WinForms will not see any more advancement in the future because their emphasis is on WPF.

WPF, on the other hand, is more more sophisticated and robust and can help you create very attractive, rich interfaces. WPF sometimes requires the use of more sophisticated back-end programming paradigms like MVVM to create effective applications. Also, as a newer technology, there are fewer mature libraries and tools to help you develop WPF apps. For development tools you have VS2008 and Expression Blend (which is quite nice BTW). Advanced graphics features like gradients, color themes, skinning, control customization are all more powerful in WPF. But this power comes at a price - most developers find WPF to have a more significant learning curve that WinForms.

LBushkin
+1  A: 

I personally like alot of the things that WPF provides. It has easy data binding, validation, and customizing UI things is simple. Plus with the new Expression Blend 3.0 that was released yesterday they have sketchflow WPF apps that you can share with others and get feedback files from. It is a pretty interesting little addition to the WPF world.

The nice thing is that if you find a Winform control or something that needs to be WPF and you picked the other way, they seem to work well with each other now.

SteveM
+1  A: 

WPF is something completely new if you are used to WinForms, so it'll take quite a while to get used to it. But i prefer WPF not because of the looks, for me it's more the great layout system (once you got used to it), its databinding infrastructure and in combination with patterns like MVVM, the separation of UI and business logic.

Botz3000
+1  A: 

Interesting, how all answers target the developer: familiarity with a framework, the learning curve, the technical features of a framework etc.

If it's a simple application, none of the technical aspects really matter. You sound like you have some experience programming, in that case the chosen framework doesnt really matter. Focus on your users instead.

Can you guarantee that your users have the latest .net runtime installed? Are they willing/able to install it if they dont? Will your users be put off by an "outdated" look and feel?

The way you phrased your question, i think you should use WinForms. You seem to imply ("stick with winforms") that you have experience in WinForms and that you dont have any fancy demands for the UI, so i see no reason to put yourself on a steep learning curve that WPF can be.

Bubblewrap
+2  A: 

It is quite a problem - and the idea that forms=old and going no where and wpf= new exciting and progressing is true.

However WPF also uses different technology - it doesn't use message loops, it does use vector graphics, it does use DirectX, its cross language and it doesn't work with Windows 98! See WPF the how and why. Does all of this matter? Not if all you want are a few buttons with minimal fancy stuff. I can't believe that the old way of doing Windows forms will ever be phased out.

PS - I hate XAML and all markup languages!

mikej