What is the most common design patterns for any windows forms application?


I am asking about that as I am going to develop a client side application using c# to display stock data and make some user-interaction, so give me links for best tutorials you read before

3/12/2009 11:27:58 PM

Accepted Answer

Jeremy Miller's guide is an excellent starting place. It covers several important patterns including:

You will also want to look at inversion of control and dependency inversion. Fowler's overview does a good job of explaining the concept. When you've looked at this, here is a tutorial on just one implementation of an IoC tool.

If you are still hungry for more, check out Rich Newman's series on Microsoft's Composite Application Block. The CAB is chock full of patterns, but avoid the official documentation as it is notoriously difficult.

2/2/2014 8:40:37 PM

To answer your question, the most common pattern appears to be generalized hacking in my experience, however if you want a nice pattern check out the MVP (Model View Presenter) pattern from Microsoft's Patterns and Practices group. Although it's an ASP.NET pattern, I modify it slightly to use on Winforms all the time.

It's a nice separation of concerns, and allows for unit test to be built through programming to interfaces (design by composition).

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow