Guests on a New Frontier
By Bryant Durrell
Userland Software's Frontier is one of the more unusual programming environments out there. It originated on the Macintosh, as a sort of competitor to AppleScript. Since then, this unique combination of database and scripting language has been adapted into a Web-site building tool, a CGI engine, and more. In 1998, Userland ported Frontier 5.0 to Windows 95; in a related development, after two years of success in the free software market Frontier is going commercial with the release of 5.1. (Visit www.scripting.com/frontier5/ for product information.)
One of the multitude of features in Frontier is an easy interface for writing CGI programs. To illustrate its use, I've created a simple guest book. The complete listing is reproduced in
Listing One. This guest book doesn't have any spectacular bells or whistles; the script, however, demonstrates the features that differentiate Frontier from any other scripting language available.
Before we can dig into the script, however, we'll need to understand some of the internals of Frontier. Everything one does with Frontier begins with the Frontier database. The basic concept behind the database is simple; at the top level, it's just a table. Any table in the database can contain any of the data types Frontier understands, including the table data type itself. Other data types include the usual programming language data types, like strings, doubles, and Booleans; there are also data types for word-processing text, scripts, and pictures.