tags:

views:

178

answers:

3

Hi all,

I 'am building a small windows form application.

I have a View - a simple form that has some functionality in it. a Controller - a class that will react to loading, saving, getting data from the model and prepare it form the view etc. a Model - a class that will get and save data to DB or file.

The controller is creating a form instance an run it, and creating a model instance when needed.

I wonder about how to react in the controller to the view events. Should I register to the view events (buttons click, combo change etc.) ? This will make the form controls visible outside the form?

Maybe I have a mistake in the design?

Thank you for the help,

Roy.

A: 

If you google MVP (Model-View-Presenter) you'll find info on how to implement a seperation of concerns pattern in a Windows form application.

pacoza
+1  A: 

Microsoft has created a framework for Win Forms MVC applications, the Composite UI Application framework.

http://www.codeplex.com/smartclient

It is probably overkill for a small project, but you could look at it and get some ideas.

Shiraz Bhaiji
Neat, I haven't seen this before.
Greg D
A: 

Can you take a look at this SO post http://stackoverflow.com/questions/1219882/using-mvc-mvp-patterns-in-winforms

P.K