3

I am new to MVP and trying to get the picture.

And I am stucked at one point:

In order to be able to unit-test more on my View, I would like to also shift some property settings to PRESENTER. So that I can see if some View properties are set and also set properly.

But at this point my 6th sense is whispering me quite noisy that I started to doubt if I am breaking MVP pattern by doing this. Because it sounds like "setting" more than "presenting" to me :(

So, if "Presenter" is setting a Property on the "View" is it a violation of MVP Pattern?

Thanks

pencilCake
  • 51,323
  • 85
  • 226
  • 363
  • See my previous answer that somewhat covers your issue: http://stackoverflow.com/questions/4794121/model-view-presenter-in-winforms/4818268#4818268 – Johann Gerell Oct 10 '11 at 16:04

1 Answers1

7

In MVP the Presenter is supposed to set properties on the View. You may be thinking of MVC where the Controller is simply responsible for handing the View a reference to the Model. In MVP the Presenter is typically pretty tightly tied to the View and responsible for directly setting properites.

Dylan Smith
  • 22,069
  • 2
  • 47
  • 62
  • Just the term 'Presenter' was a bit misleading me as it sounds like Prsenter should 'present' Not manage or manipulate... At least this is how I imagined after hearing the term PRESENTER. – pencilCake Oct 11 '11 at 06:58