Visual AJAX != Voice AJAX

There is an interesting article in the latest installment of Speech Technology Magazine – Jim Larson offers his thoughts on the use of the AJAX development technique in VoiceXML applications.

Larson points to a notable example of “AJAX-like” programming in VoiceXML. In fact, its one I have commented on before. My view of this technique hasn’t changed. It’s powerful, but it isn’t AJAX.

The way I view AJAX programming, there are two key hallmarks; processing of XML on the client using JavaScript and the DOM, and asynchronous communication with a back end server using HTTP. The approach referenced by Larson includes the former, but misses the latter.

Make no mistake, using the new VoiceXML 2.1 <data> element to fetch an XML document that can be utilized from within a VoiceXML script without a page transition is indeed handy. But there isn’t any asynchronous communication happening here – the external XML document is fetched only once, typically at the begining of script execution. For asynchronous behavior, we need to look to one of VoiceXML’s sister technologies – the Call Control eXtensible Markup Language (CCXML).

The CCXML 1.0 specification (a last call working draft from the W3C) includes the <send> element, which allows a developer to throw a user defined event that can be caught by the initiating (or another) CCXML document. The classic <send> example involves the throwing of a “timesUp” event that allows a developer to designate when a call should be terminated.

The good folks at Voxeo (leaders in the effort to formalize the CCXML standard) have added functionality to their platform that allows the <send> element to asynchronously send and receive information via HTTP. So its theoretically possible to construct a conference call application that sends a message to a back end script to kick off an IM message to the call organizer when there are 30 seconds left on the call. (Actually, that sounds pretty cool – may have to try that one soon.)

When it comes to AJAX in VoiceXML, the same functionality is generally available but the needs of developers are somewhat different. Callers to a VoiceXML application probably don’t perceive page transitions in the same way that users of a visual web application do. VoiceXML has fetching and caching functionality built into it that can be used to manage the delay between page transitions. It’s probably a better use of developer time to understand fetching and caching more intimately than to try and replicate AJAX in voice applications.

One thought on “Visual AJAX != Voice AJAX

  1. Pingback: Ajaxian » Voice XML and Ajax

Comments are closed.