Application Model Overview : Client-Server Interaction: The Life of a Request

Client-Server Interaction: The Life of a Request
ActiveGrid Applications are AJAX-enabled web applications that interact with an ActiveGrid Server using HTTP POST messages. The applications use AJAX (Asynchronous JavaScript and XML) to exchange information with the ActiveGrid Server without having to reload the entire page. The server maintains session information and coordinates access to the application’s services and databases.
Each button or link in an ActiveGrid Application is tied to an Action defined within the application. The Action contains instructions about what operations to perform when the user clicks the button or link.
1.
When a user initially runs an ActiveGrid Application, the application sends a request to the ActiveGrid Server, which responds with an HTML message containing the initial page of the application. The initial page consists of an AJAX-enabled area called an AJAXFrame, which is contained in a special ActiveGrid Page called the PageFrame. Within the AJAXFrame the application initially displays a default ActiveGrid Page (defined by a special ActiveGrid Action called the Begin Action.)
2.
The identity of the Action the user triggered (the Action referenced by whatever button or link the user clicked)
3.
4.
The ActiveGrid Server retrieves the session. The session contains the state of all active objects at the time the last response was sent. If a session does not exist (or if the previous session timed out) the ActiveGrid Server creates a new session by running the session initialization Action.
5.
The ActiveGrid Server updates the session with the data contained in the POST message and invokes the Action that was specified by the POST message.
6.
The Action contains one or more operations, such as fetching additional objects from the data service or invoking web services. The ActiveGrid Server performs each operation specified by the Action in the order they are defined within the Action.
This step typically changes the current set of objects in the session. It might optionally include committing the current transaction and starting a new one. The Action ends by invoking another Page in the application.
7.
The ActiveGrid Server finds the Page, and begins Page processing.
8.
The Server runs Message Part initializers for any Message Parts that were not initialized by the Action that invoked the Page.
9.
The Server creates Page variables are created.
10.
11.
Finally, the ActiveGrid Server renders the specified Page into HTML returns the resulting output back to the client.
12.
Related Topics:
How the Page Gets Data
AJAXFrames
Sessions
How the Files Work Together
Creating Page Flows
Defining Actions in Page Flows

ActiveGrid
ActiveGrid Documentation
Version 2.0