views:

73

answers:

2

I'm confused somewhat by the MVC implementation as used in Objective C programming. What is described as 'Controller' in Objective C tutorials and documentation, I understand as simply a view or mediator. Which is correct?

+5  A: 

A model is what holds your application's data — its model of the world.

A view is what interfaces with your user. It displays things and receives input back.

A controller handles the interactions between the other components. It tells a view how to find its content, it responds to changes in the view by updating the relevant parts of the model, and it responds to changes in the model by telling the view what needs updating.

Chuck
+1  A: 

View displays
Model holds data
Controller responds to user events and controls view and model.

Controller can't be a mediator, because view and model do not communicate with each other through it. But it controls them.

Alexander Babaev