Trying to wrap my ahead around the basic concepts here. in my understanding the Controller is the glue between the Model and the View. Typically I see drawings of the Controller at the apex of a triangle with the Model and View at the 2 base points of the triangle with 2 way arrows pointing between the Controller and the Model as well as the Controller and the View.
There is no arrow between the Model and the View which implies that in a well written app there needs be no communication between the Model and the View directly. Is this true?
When the Model changes, the Controller notifies the view to update. But to update itself doesn't the View access the model for the updated data directly?
Specifically using the Stanford course assignment 3 as an example, in the view.h file I have...
IBOutlet *PolygonShape;
PolygonShape is the Model. This works great as IB wires the View to the Model and I can then update the View with the Model's data directly when notified to do so by the Controller, but doesn't this go against the MVC conceptually? Should I somehow be getting the data through the Controller?
Thanks,
John
There is no arrow between the Model and the View which implies that in a well written app there needs be no communication between the Model and the View directly. Is this true?
When the Model changes, the Controller notifies the view to update. But to update itself doesn't the View access the model for the updated data directly?
Specifically using the Stanford course assignment 3 as an example, in the view.h file I have...
IBOutlet *PolygonShape;
PolygonShape is the Model. This works great as IB wires the View to the Model and I can then update the View with the Model's data directly when notified to do so by the Controller, but doesn't this go against the MVC conceptually? Should I somehow be getting the data through the Controller?
Thanks,
John