VoiceXML
in the Large
Welcome
to First Words, VoiceXML Review's column that teaches
you about VoiceXML and how you can use it. We hope you
enjoy the lesson.
Last
month
we had a quick look at how a VoiceXML document is structured.
Interesting applications can be built with only a single
static page, or a combination of a few static pages.
But what if you're building a large application, with
many possible user interactions, and access to dynamic
data?
VoiceXML
provides capabilities for developing large application.
In addition, the web-centric model on which VoiceXML
is based, allows the use of conventional web server
technologies for generating dynamic content. Typically
these involve templates that are processed by a web
application server to insert dynamic content . For example,
Java Server Pages containing VoiceXML templates, generate
dynamic pages by using JavaBeans to generate the dynamic
bits.
This
month, then, we're going to introduce the elements of
VoiceXML that support the building of large applications
in these environments.
Application
Structure
VoiceXML applications are comprised of a collection
of documents. From our previous column, you will recall
that a document is the equivalent of an HTML page, and
encapsulates one or more dialogs. Execution of a dialog
typically involves presentation of information to the
caller, along with collection of input from that caller.
Transition from one dialog to another is controlled
by the currently executing dialog. Transition occurs
via the <goto> or <submit> tags.
The
simplest VoiceXML application (see Figure 1) is simply
going to be a set of VoiceXML pages, returned by a web
server to the VoiceXML platform. These pages are interpreted
to control the interaction with the user.
Figure
1: Static VoiceXML Application
The
application is entirely analogous to a set of HTML pages
delivered by a web server. Transitions are controlled
by the <goto> tag (which is executed in VoiceXML,
as compared with being 'clicked' by the user in a visual
web browser).
Dynamic
applications function in much the same way, with the
exception that some or all of the pages are generated
dynamically, by a server-based technology such as JSP/JavaBeans,
ASP/ActiveX, ColdFusion, or scripting languages such
as perl. An overview of this model is shown below.
Figure
2: Dynamic VoiceXML Application
VoiceXML
defines an application as a collection of documents,
possibly tied together with an application root document.
The application root document provides a mechanism for
retaining state among a related set of VoiceXML documents.
A VoiceXML refers to its application root document using
an attribute in the <vxml> tag. This means that
the event handlers, variables, and global grammars defined
in the root document are available to the subdocument
for use. This structure is shown below:
Figure
3: Application Level Information
So
while VoiceXML pages do not retain state across <goto>
and <submit>, the application root document allows
the definition and management of data and behavior that
is persistent across VoiceXML pages. This allows both
static and dynamically generated pages to manage global
data, and to provide consistent handling of events,
and access to global (and consistent) behavior across
an entire application.
back
to the top
Copyright
© 2001 VoiceXML Forum. All rights reserved.
The VoiceXML Forum is a program of the
IEEE
Industry Standards and Technology Organization (IEEE-ISTO).
|