MVP tutorial

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

MVP tutorial

Victor Goldberg-2
If this discussion already happened, I apologize.

I wanted to use Dolphin's MVP tutorial web address as a reference for an
article, so I started browsing and reviewing the tutorial, and I saw the
graph representing the framework.  It shows the Model responding directly to
the View, and never responding directly to the Presenter.  It also shows the
View talking directly to the Model. This seems to me neither correct, nor
accurate.

Even if the Presenter feeds the Model with an instance of the View, and
tells the Model "here, write your data in this instance", by responding, the
Model is responding to the Presenter, which then turns around and furnishes
the data to the view.  The Model should never talk directly to the View.  It
could also be that the view not only request data, but this data has to be
shown in a different window.  It is the responsibility of the presenter to
create an instance of this new window and populate it with the data it
received from the Model.  However, how can the Presenter do this if it never
received the data from the model?

Also, if the intention is to minimize the points of contact, the View should
not be talking to the Model, but pass all the messages to it through the
Presenter.

Victor