Online documentation - Websydian v6.0

Users Guide | Patterns Reference | WebsydianExpress | Search

 

The Websydian Circle and the Main Functions

The figure below illustrates the basic flow of a Websydian application:

The Websydian Circle

The box in the figure marked 'Web Browser' represents the user's web browser.  All other boxes in the figure represent functions derived from the functions in the Websydian pattern libraries.  The arrows between the boxes show the flow of control in a running application.

The Web Browser

The web browser is where the user is located.  When the user follows a link or clicks a button on the web page in the web browser, a web request is sent to the application.  The response to a web request is always a web page, so the job of the web application is to provide the appropriate web page to every request received.

A web application can have many users at the same time, and the requests from the various users arrive in no particular order.  When required, web applications must keep track of individual user sessions explicitly by adding Session-handling logic.

The Websydian Main Functions

Websydian handles the task of processing the requests and controlling the flow of events with a set of functions together forming a circle as illustrated on the above figure. In the following sections each of the main functions and their role in the Websydian Circle are described.

The Dispatcher Function

The Dispatcher function works as the Web Application's Single-Point-Of-Entry. It retrieves all the input received from the web browser. Based on that input, it determines whether to transfer control to an Event Handler function or to the Call First Page function (when a user is requesting the first web page). In addition, the Dispatcher function is responsible for performing security-related checks.

There is always only one Dispatcher function in a Websydian application.

The Call First Page Function

The Call First Page function performs two important tasks. It contains the processing required to create a user session, and it calls the Page Generator function of the entry page of the Websydian application. The function is called automatically by the Dispatcher function when it detects that a new web user is logging on to the Websydian application.

The Event Handler Functions

There is one Event Handler function for every web event that can occur in the application. The role of the Event Handler is to perform the processing associated with the corresponding event (e.g. updating the database) and to decide which web page should be the response to the event by calling the Page Generator producing that page.  In the course of their processing, Event Handler functions often need to access the database.

Usually, there are many Event Handler functions in a Websydian application.

The Page Generator Functions

There is one Page Generator function for each page the Websydian application may produce in response to a web event.  The web page produced to a specific request is created by inserting values into a Document Template.  In the course of their processing, Page Generator functions often need to access the database.

Usually, there are many Page Generator functions in a Websydian application - one for each possible HTML page in the application.