Standard I/O Implementation

The Standard I/O component implementation is designed for creating server-side expand methods in any of several scripting languages on UNIX-based servers. You could implement a Standard I/O component using a compiled program, but a dynamically linked library will be much more efficient. The Standard I/O implementation option is not available for servers running under Windows 95 or Windows NT, and it can only be used to implement the server-side expand method, and not the client-side edit method.

The Standard I/O implementation is designed to be as similar to traditional CGI programs as possible. Data is passed to a Standard I/O component in two ways. The CGI environment variables are passed via the process’ environment. The other two dictionaries (the component attributes and the form variables) are merged into a single dictionary, and passed to the component implementation via the process’ standard input file in

 WWW-FORM-URLENCODED
format. This is the same format expected by any standard CGI script that expects to handle form submissions. The standard output file is used to return the generated HTML.

If you want to create a component in a scripting language besides Perl and Tcl (the languages used in the FrontPage SDK examples), you need to make sure that it supports standard I/O, and you need to create a procedure that parses form data from the standard input file into internal data structures. There are many examples of such routines for other languages available on the Internet.

To allow the component implementation program to separate the merged name-value pairs into separate dictionaries, all component attribute names are prefixed with the string “

_BOT_
”. Form variable names are not modified. The _BOT_ prefix is a feature of the Standard I/O binding, and is never used with the DLL binding.

To implement multiple components in a single script or program, your main procedure should examine the custom component variable

_BOT_bot
, which contains the component shortname. You can then switch processing to a component-specific expand procedure based on this value.