6

I have read online about MVC, MVP patterns for UI design. But, I can't quite grasp how the it works even after re-reading it couple of times. I use C#/winforms for development. Can someone point me to a good book/blog/website? Something that will make me decide if I should adopt it or not. Thanks.

2
  • Join the club :-). It can be a bit confusing... Commented Aug 2, 2009 at 21:27
  • I'm also very much interested in this subject. I can see the advantages if you need to have the app run in different environments, but I don't see the advantage otherwise. Commented Aug 2, 2009 at 21:29

5 Answers 5

12

Check out some of these videos over at PolymorphicPodcast. He does a good job of describing the MV* patterns and gives solid examples of each. Specifically, check out the winforms video.

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

1 Comment

+1 for the podcast. I think upon watching them was when design first really clicked for me.
3

I actually think Wikipedia's page on MVC has a very good overview of the Model View Controller architecture.

You can do MVC with Windows Forms and C#, but it is more difficult than with other platforms. MVC is all about separation of concerns - and should be usable with any platform. However, certain platforms make this much easier than others.

The "trick" to getting this to work well in a Windows Forms application is making sure to have a clear separation of concerns in how you design your forms. Try to keep some separation between the event handling (controller), the form design and layout (view), and the business logic and design (model). The basic design of windows forms doesn't explicitly force or guide you to having this separation, so it will just be up to you to keep those things separate.

The trickiest one in Windows forms is keeping the view and controller from getting too interdependent. The WinForm designer naturally puts all of the event handling into the same class as the form, so it's easy to get the two things tied together. You'll have to keep that separation in place yourself, if you want to follow the class MVC architectural patterns.

Comments

0

How about this SO post. This has a good overview of that they are.

Comments

0

Start by reading Martin Fowler's comparative article on different GUI Architectures. It covers MVC (as MVP used to be called) and a lot of other useful information that should help to frame the concepts for you.

Comments

0

I just wrote a blog entry about using the MVP Passive View pattern.

http://coding.infoconex.com/post/(MVP)-Model-View-Presenter-Passive-View.aspx

Looking for feedback if I got anything wrong.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.