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
views:
1866answers:
3To 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).
This is only a partial answer, but I really enjoy referencing the Windows Vista User Experience/Interaction Guide (there's a pdf link for the whole thing too). Most of it, of course, is directed at matching your application's look and feel to fit in with Vista.
Some of it, though, applies universally - especially the sections on the differences of warnings, errors, and other messages, and when to use each. I find myself checking those guidelines every time I work on something that's going to make a pop-up - and the guide doesn't pull any punches when getting after Microsoft programs for breaking these guidelines.
I don't know of a guide like this that exists for Windows XP.
Jeremy Miller's guide is an excellent starting place. It covers serveral important patterns including:
- Model - View - Controller - There are several flavours, make sure you examine them all
- Automated unit testing of GUI binding code
- Command pattern
- Registry
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 implentation 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.