Which option best suits the MVP model
Which option best suits the MVP model
While I was refactoring some code I had a doubt.
If some error happens in the model class, would it be better to call a method of the model class from the presenter class to check if something went wrong, or instead call a method of the presenter class from the model class when the error happens?
For example: Call a method of a model
class (from presenter
class)
model
presenter
if (modelClass.isWhateverRight())
//Do something
Or Call a method of the presenter
class (from model
class)
presenter
model
if (something)
presenterClass.showMessage();
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.