Main Menu
Lecture 1
Lecture 2
Lecture 4
Lecture 5
Lecture 6
Lecture 7
 

 

 

Message Time Line

To know when to do things, such as initialisation and calculations by overriding the above functions you need to understand the sequence in which they are called.The message sequence goes from Application to Session to Active component in sequence.

When the response has been completly assembled, but before it is sent back to the user, the objects are put to sleep in reverse order.

Lecture 3 Demo 2 ( Download )

Application Example :

First step: Server starting up
Opening application's URL in browser:
http://localhost:49389/cgi-bin/WebObjects/tut41
Waiting for requests...
Application awake - First User requests top URL
Second step: Session starts
Session 1 awake
Main component awake
Main component append to response

Session append to response
Application append to response
Main component sleep
Session sleep
Application sleep
Application awake
- 2nd User requests top URL
Second step: Session starts
Session 2 awake

Main component awake
Main component append to response

Session append to response
Application append to response
Main component sleep
Session sleep
Application sleep


When the appendToResponse() message reaches the component, the component's HTML template is traversed and each dynamic element with bindings triggers the sending of accessor messages to the component object.


 
Page updated August 25, 2004