开发者

Webforms to Winforms

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 开发者_如何学Cassist 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.


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.


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.


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.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜