vendredi 16 mars 2018

Model view Controller with dynamic behaviour

The question is about dynamic behaviour of GUI(grahical user interface). I understand how Model view controller work but in some cases we can have a general event, Should controller determine the nature of that event and forward request accordingly or is it the responsibility of GUI self to forward a more specific request to controller.

An example: Suppose i have a blank-screen with only one object. If i click on empty space then i should get a line-drawn but if i click on the object then that objects should get selected.

When we click somewhere on the screen, should the GUI forward a general request to the controller without knowing whether it is about creation or selection, or it should first determine self the nature of the event?

The confusing part is that if we have a button and we know that it has been clicked, then simply we send accordingly request but here i don't understand who should determine the nature of the event, controller or GUI?

Aucun commentaire:

Enregistrer un commentaire