Scripted Mobile Channels

A scripted mobile channel has three components: scripts, data, and a CDF file. A script defines a template that specifies the appearance and layout of a channel, subchannel, and item views. Scripts are written in a subset of Microsoft Visual Basic Script (VBScript). The scripting environment is similar to the scripting environment for Active Server Pages in Internet Information Server (IIS).

Data is typically a dynamic HTML file and formatted in a manner specific to the content. Data is packaged in simple text files for use with devices that have limited bandwidth and storage capacity. This data is readily accessible through the script.

Mobile Channels stores scripts, data files, and all content on the Windows CE-based device in a special-purpose cache. Browsers call URL references to the Mobile Channels Transport Protocol (MCTP). MCTP then invokes the script interpreter. In turn, the script interpreter accesses data and CDF files by running scripts. In this process, the script interpreter loads both scripts and data from the cache. The interpreter outputs pure HTML back to the MCTP and eventually to the Channel Browser application.

At display time, the Windows CE-based device executes the scripts to construct a HTML page. These pages render data in a browser using structural information contained in the CDF file. The CDF file is based on the Internet Explorer 4.0 CDF with additional Mobile Channels extensions. For more information on Mobile Channels CDF extensions, see Mobile Channels CDF Reference. To present an index to the user, the computer can access data items or additional subchannels through the CDF file. The browser can then retrieve item titles directly from the items.

This blending of scripts, data items, and CDF files is more complex than a standard channel or Web page. However, the combination yields more benefits when correctly applied. By separating the content into a template and data, Mobile Channels delivers content in small segments rather than full HTML pages.

The following table shows instances in which scripting should be used to create a mobile channel.

Channel description Scripting element Result
Shows static and dynamic data on the same page Use static data and scripted instructions to build a Mobile Channels template Only has to update the dynamic data
Provides multiple views of the same data Use a client-side script to interpret the same data in numerous ways Decreases the download time and the footprint for your mobile channel
Is interactive, or is derived from a device-side application Use a library call, which passes information to and from a DLL on the client device The page content extends out of HTML and into a full-fledged application
Incorporates user preferences and subscriber  read/unread status into the mobile channel. Use subchannels and cookies to personalize individual user data A user can personalize a mobile channel

To create a scripted mobile channel

  1. Create a Mobile Channels CDF file that describes your channel content.

  2. Separate the content into Mobile Channels script files and Mobile Channels data files.

  3. Write script files that comply with the pASP protocol for the Windows CE-based device.

  4. Package incremental data, such as news articles or stock quotes, in one or more text files.