2

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?

3 Answers 3

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Neat, I haven't seen this before.
0

Can you take a look at this SO post using MVC MVP patterns in winforms

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.