Question

I have a very simple question. Someone else might have this question as well but is not asking it. So I will.

My question is: Is it valid, in the MVP model, to have the model call a method that updates the view?

Or do I have to have the model call the method and the method gets the data for the model, then the model passes that information to the presenter and the presenter sends the data to the view.

Thanks,

Darren.

Was it helpful?

Solution

One goal of the MVP pattern is to separate the view from the model. Model, View and Presenter have distinct responsibilities.

For an effective MVP implementation, you should call a method on the presenter if your data has changed. Updating the view is the job of the presenter.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top