Besides leveraging the design patterns and methodologies used with the Foundation framework, the Application Kit relies heavily on several others. Two that merit special attention are Model-View-Controller and Target/Action.
The Model-View-Controller (MVC) pattern is the driving design pattern in the Application Kit. The premise of this pattern is that code may be split up into logically distinct units that each perform a specific role:
The model is an object that encapsulates data and provides logic that manipulates that data.
The view is a separate object that only knows how to display data.
The controller is an arbiter between the model and the view. The controller’s job is to take data from the model and pass it to the view where it can be displayed. If the view is interactive—able to accept user input—then the controller will interpret those actions and instruct the data model to do something in response.
Many views in the MVC pattern may subscribe to the controller, giving the application flexibility to display data in different contexts and formats without heavy modification of the modeling and control logic. This idea is illustrated in Figure 3-1, which shows two views of the same data: a table view of the data and a chart view.
The Application Kit uses ...