views:

114

answers:

3

from an iphone development perspective

+3  A: 

The controller connects views (UI elements) to model objects. Views are for display, model objects are for data, controllers are the glue in between them.

See the Cocoa Fundamentals Guide for an explanation of the three tier architecture of the Model-View-Controller pattern.

Nikolai Ruhe
+5  A: 

A view is an object that is drawn to the screen. It may also contain other views (subviews) that are inside it and move with it. Views can get touch events and change their visual state in response. Views are dumb, and do not know about the structure of your application, and are simply told to display themselves in some state.

A view controller is not drawable to the screen directly, it manages a group of view objects. View controllers usually have a single view with many subviews. The view controller manages the state of these views. A view controller is smart, and has knowledge of your application's inner workings. It tells the dumb view objects what to do and how to show themselves.

A view controller is the glue between you overall application and the screen. It controls the views that it owns according to the logic of your application.

Squeegy
+1  A: 

There is a pattern called MVC or Model-View-Controller. View and Controller are from there. You can read about it in Apple docs or here (for example, it's a widely used pattern): http://en.wikipedia.org/wiki/Model-View-Controller

Alexander Babaev