MVC Pattern and Framework history

(CS6320 PowerPoint)

mvc diagram

 

Purpose

To separate/ decouple the view (look) of an item from its model (data) and controller.

How it Works

  1. user interacts with the user interface in some way (i.e.a mouse button).
  2. controller handles input event from user interface, often via a registered handler or callback
  3. controller notifies the model of change --possibly resulting in a change in the model's state.
  4. view queries the model in order to generate an appropriate user interface. Controller may issue command for view to (re) render itself OR in other implementations view is automatically notified by the model of changes in state (Observer) that require a screen update.
  5. The user interface waits for further user interactions, which restarts the control flow cycle.

 

History (only a little)

  • MVC described in 1979 by Trygve Reenskaug, then working on Smalltalk at Xerox PARC.
  • First Implementation 1980 - Smalltalk  -- subclass for each pane to adapt to model
  • Pluggable views: 1983   -- specify messages to send to model with symbols
  • ObjectWorks 4.0: 1989  -- compose model from value holders, compose view from Wrappers, Composites
  • VisualWorks:  1992  -- UI builder
  • VisualWorks:  1998  -- event driven Controllers
  • 199*- Java Swing - uses MVC as basis for GUI development.
  • 199* - Microsoft ASP .NET
  • 200*- IPhone, Android uses MVC