views:

106

answers:

2

Hi,

I working on a MVP designed application and have some design questions. When writing code in the presenter-layer how should the comunication go between different presenter/viwes? Lets say I have a WindowPresenter with its WindowView and I want to set the window title on a window from another window. I have a title/set:er on the window view that wraps the actual gui title. Should I call the title-seter directly on the view (windowPresenter.View.Title = "Title") or should I wrap the view title as a presenter title seter (windowPresenter.Title = "Title") ?

+1  A: 

Ask yourself how would you test it? If you do windowPresenter.View.Title = "Title", how can you test that presenter is setting the title?

epitka
Ah thank you, I felt there was something that didn't fit. Maybe its even a bad design decision to expose the presenters view?
Marcus
+1  A: 

There is a nice article that focuses quite a lot on similar things in MSDN magazine this month:

Beyond MVP - Extending the MVP Pattern for Enterprise-Class Application UI Architecture

CodingInsomnia