Issue Date: January/February 2006, Posted On: 3/16/2006

Technology Trends: Metalanguages and AJAX

By James A. Larson Intel Corporation

The client-server model enables developers to partition computation between servers and clients. For traditional Web applications, the client may range in power from a low-end terminal to a powerful PC. Because many telephones do not have hardware that supports speech processing, a voice server is placed in the network to act as a client on behalf of telephones. In order for Web applications to work with all types of clients, developers minimize the processing performed on clients by downloading Web documents from the server for interpretation on the client. Documents may be:

In both cases, the client performs little processing beyond interpreting the documents.

Figure 1

AJAX3 —Asynchronous JavaScript plus XML—is an alternative model to server-side computing. In the AJAX model, a block of data is downloaded from the server to the client where an AJAX script uses the data to perform several interactions with the user without additional data exchanges between the client and server. Because the AJAX script is processed on the client, AJAX is an example of client-side computing.

Figure 1 illustrates how AJAX minimizes user wait time. The horizontal black lines indicate the processing activity for the user (user processing activity includes the time it takes the user to formulate and enter information), the client and the server. Traditional data fetches are illustrated in Figure 1a. Note that there are several idle times (indicated in red) where the user waits for data to be downloaded from the server. The AJAX approach (Figure 1b) minimizes the user wait times by performing fewer data fetches and executing AJAX scripts on the server. 

Voice XML 2.14 supports a type of AJAX without special scripting by using two new elements:

  1. <data> element to fetch data
  2. <for>element to iterate through items in the data, enabling the user to interact with each data item without waiting for lengthy downloads from the server

In his article about implementing pick lists, Matt Oshrey5 explains how to use the two elements to download a list of options from the server to the client and present each option one at a time to the user. When the user hears the desired option, the user selects the option by speaking "tell me more."

VoiceXML 3.0 will use the DFP (Data Flow Presentation) framework6, which continues the trend started by the element in VoiceXML 2.1. The VoiceXML 3.0 version of will retrieve a block of data with which the user can interact without multiple time-consuming downloads. The fetched data may be returned to the database after the VoiceXML 3.0 application has updated the data.

Developers continue to debate the relative merits of server-side and client-side computing.

Factors favoring server-side computing include:

Factors favoring client-side computing include:

VoiceXML 3.0 permits both server-side and client-side processing. Developers can use metalangauges and CGI scripts with VoiceXML 3.0 for server-side processing. VoiceXML 3.0's <script> and <data> elements are processed on the client side. Developers can even use both: metalanguage on the server side to generate the <script> and <data> elements for processing on the client side. Developers have the means, and the responsibility, to develop efficient speech applications using the proper combination of server-side and client-side processing.