Lecture 10

Topic 9: Event Driven Programming (Java vs Javascript vs MaxMSP)
slated for Lectures 9, 10, 11, 12

Lecture 10

(continuation from L9)

I. Model-View separation - key points
a. observer/observee roles
b. events can be identified (in the sense of "happenings"), but they are not explicitly represented as objects

II. Events - explicitly represented
The example application EventGeneratorExample_F demonstrates that all sorts of events are being continuously dispatched by the root widget of the GUI. It is a separate matter as to whether any entity is actually listening to the events. This code example sets up a controller (EventTracker_F) which installs itself on the view and relays information about the occurrence of various events: window events (such as activated, deactivated, opened, closing, closed, iconified, deiconified) mouse moved events, mouse events (press, release, click)

III Observer/Observee roles for the view/model (respectively). The Model is the observee, the view is the observer (of the model)

IV. The Controller in Model-View-Controller
- who might observe the view? the controller observes the view in the sense that it's role is to accept input from the user and figure out what this means to the model

-an extensive explanation on the black board tracing the steps involved in DrawVersion7.java