samedi 23 mars 2019

Can model use observer to get input?

Observer by definition is just an observer/update mechanism and if user interacts with model, it leads to MVC pattern but can a model ask observer to get input?

From implementation point of view, it works well and the model waits for input from the user but would this be a bit of violation of observer pattern (which is generally one way)?

Alternatively, I will have to handle the case when the observer needs input in a view and make the method in model not ask for user input.

Aucun commentaire:

Enregistrer un commentaire