Home Segments Top Top Previous Next

761: Mainline

Graphically, the following diagram illustrates how various model–view class instances fit together.

                                                        Application 
                                                      *------------* 
      Creates and connects                            |            | 
    *-----------------*--------*----------------*-----|            | 
    |                 |        |                |     |            | 
    |                 |        |                |     *------------* 
    v                 |        v                | 
  Model               |      Observer           |       View 
*------------*             *------------*       |     *------------* 
|            |  Activates  |            |       *---> |            | 
|            | ----------> |            |             |            | 
|            |   Fetch     |            |             |            | 
|          *-------------- |            |             |            | 
|          | |             *------------*             |            | 
|          | |   Relay                                |            | 
|          *----------------------------------------> |            | 
|            |                                        |            | 
|            |        |      Listener                 |            | 
|            |        |    *------------*             |            | 
|            |        *--> |            |  Activates  |            | 
|            |             |            | <---------- |            | 
|            |             |            |  Fetch      |            | 
|            |             |            | --------------*          | 
|            |             *------------*             | |          | 
|            |                             Relay      | |          | 
|            | <----------------------------------------*          | 
|            |                                        |            | 
*------------*                                        *------------* 

The diagram treats the instances anthropomorphically, using words such as connect, activate, fetch, and relay. Later, you learn how to translate those words into calls to particular methods.