tags:

views:

122

answers:

5

I am what I would consider a very experienced web developer, not to mention programmer in general. One area I have never seriously moved into is winforms development. Could someone recommend some resources that would be assist me in getting familiar with winforms? Many of the resources I have found are less than desirable in that they either cater too much towards beginners or they lack good software design principles.

A: 

Look also into WPF, which is winform successor...

Dani
And follows the MVVM (kind of a variant of MVC) which would probably fit well in the mind of an experienced web developer.
Lazarus
+2  A: 

First off, I would probably recommend you to dive into WPF rather than winforms these days. Winforms is the "old" way of doing .NET windows applications, and WPF is the way of the (at least near) future. That said, windowsclient.net seems to be the official MS information outlet regarding these technologies.

Fredrik Mörk
A: 

Hahahahaha. Well in my opinion pretty much every single example of Winforms lacks good software design principles. This is due to the "form first" development style that visual studio uses by default.

In most demonstrations and samples there is no benefit in producing a more pleasing design as you're trying to demonstrate just one thing and redoing the architecture would be overboard.

Quibblesome
Mr -1, i'm not trolling, i'm serious. Unless you think putting all the logic in the GUI components is a good idea. There are examples of using WinForm in a purer form (where the view has less prominence) but these are mainly stored in source repositiories in closed source. I don't think i've ever seen an example of this online.
Quibblesome
@Quibblesome: there is nothing forcing you to put all the logic in the GUI components in Winforms.
Fredrik Mörk
(it wasn't me downvoting, btw; I usually don't vote in "threads" where I also answer myself)
Fredrik Mörk
@Fredrik. Ya, I agree. I do WinForm all the time. The OP is looking for a resource online with WinForm with good design principles. I'm stating it is doubtful he'll find one online is all.
Quibblesome
+1  A: 

Actually, coming from a web background will probably help you write thick-client software (WinForms or WPF; I can think of many reasons to continue work on WinForms), because many of the pittfalls of winform development are simply not possible in a web environment (such as keeping connections open between units-of-work/interactions and in general holding on to [a large number of] various resources).

Some tips:

  • Vigorously apply separation of concerns/single responsibility concepts and keep your "form code" as thin as you can.
  • Automate boring stuff like validations, data binding, etc, as much as you can.
  • Try to implement good presentation patterns like MVP, look at stuff like Prism from the P&P guys at Microsoft. The presentation patterns wiki by Jeremy D. Miller contains some gems already in this area.
  • make up your mind on the UI style (page-like, MDI, tabbed, etc) and try to stick with it. Come up with a policy on when to open and close views and when to put which ones in a "main" window as opposed to popups; this can offer new degrees of freedom that web devs are not always familiar with.
tijmenvdk
+1  A: 

Windows Forms 2.0 Programming (Microsoft .NET Development Series)
by Chris Sells and Michael Weinhardt

Programming WPF
by Chris Sells, Ian Griffiths

Applications = Code + Markup: A Guide to the Microsoft Windows Presentation Foundation (Pro - Developer)
by Charles Petzold

If you're looking to build enterprise desktop applications and are familiar with OO Design Patterns, I'd recommend SCSF and CAB as a backbone and Clickonce as the deployment mechanism.

Travis Heseman