from an iphone development perspective
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 tell listeners or delegates about any events that occur in them. Views are dumb, and do not know about the structure of your application, and are simply told to display themselves in some state, and listened to for events.
For example: a text label, a button, a checkbox, a progress bar.
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 it knows how to interact with your application. It tells the dumb view objects what to do and how to show themselves.
For example: a screen that shows a list of users, an edit user form, a login screen.
A view controller is the glue between your overall application and the screen. It controls the views that it owns according to the logic of your application.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With