-
+
MVC PROGRAMMING IN THE REAL WORLD
threads
- MIDI I/O probably happens in a thread other than
the (main) GUI thread
- we require cross-thread mechanisms for
Controllers and Views
notifying Views about Model changes
- basically, an anonymous callback system
- when the state of the model changes, invoke all registered
callbacks for that change
- libsigc++
- QT ``signals/slots''
- GObject signal system
benefits
- anonymity:
- the model doesn't know about the views, no UI code
in "backend"
- the views and controllers don't know about each other
- scalability: add/remove views or controllers without modifying
model, or other views/controllers.