Reputation:
So I was always taught that the correct cycle is that a view (e.g. a dialog in a gui) only holds display features and no functionality -- it is "dumb" in a sense.
In the view you then have listeners for when a user presses a button, and when that happens, the view communicates to the controller that the button was pressed (via an observer pattern), and then the controller does the appropriate action -- update the GUI and model. So the view never interacts with the model.
But then there are other versions like the one below, in which the view interacts with the model directly.
It's kind of annoying that there are so many different variants across the internet and no one standard thing -- so what really is the correct mvc style for GUI apps???
Upvotes: 0
Views: 129
Reputation: 3476
There is no "correct" way. Different people have come up with different interpretations. Maybe you would like to read the answers of a similar quora question.
For your own sake you can settle on the interpretation that is most appealing to you (or that is the company standard). Best is just to stay with one interpretation and not use different approaches for every piece of the software.
Upvotes: 1