1. Glossay of Terms
2. Variable Naming Conventions
3. Object Database Map
Directives are items that affect the contents of a page. They begin with a # sign and go at the top of pages, one per line. In tables, they also begin with a # sign, unless stored in the #prefs table, where the # sign is optional.
See also the Frontier site, http://frontier.userland.com/, for a list of website framework directives.
A Dynamic Link Library is an external file containing code, usually written in C or C++, that Frontier can call. On Macintosh, these are also called shared libraries. One way to extend Frontier is to write DLLs. Regex and ODBC are examples of Frontier DLLs.
Contains documentation about Frontier's verbs, one verb per page. DocServer is on the web, at http://docserver.userland.com/
An HTML page with a Frontier object embedded inside it.
A website's #filters table contains three scripts -- firstFilter, pageFilter, and finalFilter -- that allow your scripts to change the contents of the page at different steps of the rendering process.
Frontier's main object database. This database contains a System table and much of Frontier's functionality.
A guest database.
An object database other than Frontier.root that does not contain a System table.
See the New Website section of the website tutorial.
Directives and attributes are inherited through the object database hierarchy. For example, a page inherits its background color from the #bgcolor directive in the table above it, or the table above that, and so on. Inheritance allows for attributes and directives to be over-ridden.
See the section on inheritance in the website tutorial.
1. A Frontier script, embedded in the source of a web page or in its template, delimited by curly braces.
2. A script that is called by an embedded macro (1. above).
Any item in an object database table is an object: it's a generic term for a database item.
Example use: "Edit the template object to give your site a new look."
A Frontier database, composed of tables, subtables, and various types of data.
An object database.
A #prefs table is a way to group table-based directives. It's not necessary to use a #prefs table, but it can be a helpful organization tool.
See the Changing Colors section of the website tutorial.
The process of flowing a page's contents through a template, and evaluating embedded macros and glossary references. When a page is previewed or published, the page is first rendered.
A root is another name for an object database. Object databases end with the file extension .root.
Windows keyboards don't have a Return key, but Mac keyboards do. On Windows this refers to the main Enter key, not the keypad Enter key.
A table is an item in an object database. Tables contain various types of objects and windows -- and they can contain other tables. Tables are like folders on your hard drive.
A template contains the design for a site, it's "outer" HTML. Templates are used to give a common look to your site, so that your entire site can be changed easily and quickly.
See the Editing Templates section of the website tutorial and the HowTo at the Frontier site on using multiple templates.
The #tools table in a website contains macros, text, and outline renderers that are used in building a website.
There are no rules about variable naming, other than that variable names should contain only letters and numbers.
But there are certain conventions -- not rules, but practices -- that are often followed.
The reason to follow these conventions is that it makes your code easier to read by other people. It also makes it easier to read other people's code, if they've followed the conventions.
One general convention is that variable names are inner-cased. This means that for multi-word names, the first letter is not capitalized, but the first letters of subsequent words are capitalized. A variable would be named indexCounter rather than indexcounter, IndexCounter, or some other variation.
Note that variable names are not case-sensitive: Frontier treats indexCounter and indexcounter as the same variable. The reason for inner-casing is purely for human readability.
adrPageTable, adrParamTable, pta
These usually contain the address of the current page table. The modern way is to use pta: it's shorter, saves typing.
Addresses usually start with an "adr" prefix, as in adrPageTable, adrItem, adrPage, or adrObject.
This is almost always the path to a file on the hard drive.
Booleans usually start with an "fl" prefix, which is short for flag. An example might be flSupportsIndexing or flFound.
htmlText is the name of a string that a website macro, outline renderer, or CGI script might return. This is a string that contains HTML text.
i, j, k
For numbers that are loop counters, one usually uses i. For a nested loop, j is used. For a loop nested inside there, k is used. And so on.
This is a "wanderer," used when traversing an object database.
The type of an object, as in
Miscellaneous string variables are often, simply, s.
This is a map of the shipping Frontier.root, followed by a list of frequently asked questions and answers.
Table of Contents
Frequently Asked Questions
These are example objects of different types. Some of these are used as examples in various Frontier docs.
The scratchpad is for transient storage.
Items in the scratchpad don't disappear when Frontier is quit: however, it's not for permanent storage.
The suites table contains mini-applications. Many suites have their own menu, and can be activated by choosing the suite's name from the Suites submenu that's in the Main menu.
This is a suite of utilities for managing AppleScript scripts and OSAXen in Frontier.
See Working with AppleScript.
This suite implements BBEdit-managed websites.
See BBEdit and Frontier.
This suite contains utility scripts for building Frontier glue files based on an application's aete resource.
This suite manages custody of odb objects, so that WebEdit and similar applications can check in and check out objects.
This suite is needed to make droplets.
A set of scripts for scripting FileMaker Pro. It's designed to be easier than using the Object Model FileMaker verbs.
See the FilemakerLib website.
A small utility suite that presents an user interface for creating aliases in various locations.
Simplified glue for scripting Anarchie or Fetch -- FTP clients -- on Macs.
A set of traps for receiving mail from Eudora and storing the mail in object databases.
A suite which implements navigators -- MacBird cards which are a sort of help system, which show people where things are.
Utilities for managing Macintosh networks.
Presents a user interface for creating a new script: one can choose the type and location of the new script.
Implements external editing of objects in the root. Text files can be edited by BBEdit, MacBird cards can be edited by the MacBird card editor.
Presents a menu and interface for storing refcon data in outlines.
Manages users and groups. This suite is used by WebEdit to provide access control to object databases.
An example suite which contains a table of state names.
This suite, the client side of WebEdit, presents a menu for check-in/check-out and remote editing of database objects (via the web, via HTTP).
See Setting Up the WebEdit Suite.
The server side of WebEdit.
See Setting up the WebEdit Server.
Agents are background tasks in Frontier.
When chosen in the About Window, displays the path to Frontier.root.
Calls system.menus.agent, which manages Frontier's context-sensitive menubar.
When chosen in the About Window, displays the number of minutes since this version of Frontier shipped.
Calls the scheduler, which manages scheduled tasks.
When chosen in the About Window -- as it usually is, it's the default -- displays Frontier's version, free memory, and the current date and time, and the number of current threads.
Manages synchronization between Netscape's and IE's shared menus.
These scripts are called when certain events take place in Frontier. They also call corresponding scripts in the user.callbacks table, so that Frontier's user interface can be customized by the user.
Called when a Frontier window is closed.
Called when text is command-double-clicked on (Macintosh) or control-double-clicked on (Windows).
Called when an uncompiled script window is being closed. Default behavior is to present a dialog box asking if the user wants to compile the script.
Called when text is control-double-clicked on (Macintosh).
Called when a window is opened.
Called when text is option-double-clicked on (Macintosh) or alt-double-clicked on (Windows).
Called when Frontier is becoming the frontmost application.
Called when a window is about to be saved.
Called when Frontier is shutting down.
Called when Frontier is starting up.
Called when Frontier is stopping being the frontmost application.
Contains MacBird cards that are part of the user interface on Macintosh.
This table is maintained by the Frontier application: it's not supposed to be edited by the user.
Contains the address of the active card.
Contains tokens used by the compiler.
Contains constants and tokens used by the language.
Contains the stack which can be viewed while debugging.
The list of current semaphores.
The list of current threads.
The list of currently-open Frontier files. Contains references to their contents.
The path to the current desktop script is stored at system.deskscripts.path.
See the page on Desktop Scripts.
Contains data about the machine Frontier is running on.
True if the machine is a Macintosh, false otherwise.
True if the machine is a Windows machine, false otherwise.
The major version number of the operating system.
The minor version number of the operating system.
The entire version number of the operating system.
The full name, for display use, of the operating system.
Contains UCMDs, XCMDs, DLLs, and their glue scripts.
(Note: beginning with Frontier 6, it's preferable to store such items in guest databases, but it's not required.)
This table ships empty on Windows. On Macintosh, it contains:
UCMD and glue for setting Finder info bits on Macintosh.
UCMD and glue for manipulating resource and data forks of Macintosh files.
UCMD and glue for getting and setting Internet Config preferences on Macintosh.
UCMD and glue for running a dialog similar to the Macintosh Jump dialog. (It's an early version of the Jump dialog, which is now implemented as a MacBird card.)
UCMD and glue for converting Latin-encoded text to Mac-encoded text. This is used mainly in CGIs and dynamic pages.
XCMD and glue for implementing a list selection dialog box.
UCMD and glue for implementing a locked user interface.
UCMD and glue for logging into a remote volume.
UCMD and glue for logging out of a remote volume.
UCMD and glue for presenting a password dialog.
(Use dialog.getPassword instead.)
UCMD and glue for miscellaneous string and list processing.
UCMD and glue for stuffing and expanding StuffIt archives.
UCMD and glue for returning the system's largest block.
Math functions: sines and cosines, etc.
Sample UCMD and glue for manipulating words in strings.
Contains constants and scripts used in the Macintosh version of Frontier only.
Various constants used in Apple events.
Core Apple events verbs.
Apple events verbs.
More Apple events verbs.
Constants used by Object Model Apple events calls.
The four required Apple events verbs.
This table contains Frontier's main and Help menus, shared menus, and scripts that menus call.
This is called from system.agents.menuMonitor.
This script manages Frontier's context-sensitive menubar.
Builds Frontier's menubar.
Manages the Suites submenu in the Main menu.
Contains information about the current installed suite and the type of the frontmost window.
Frontier's Help menu.
Frontier's main menubar.
Contains menus that appear based on the type of the frontmost window.
Contains scripts that various Frontier menu items call.
Contains shared menus for applications that support menu sharing.
This script is called from the Suites submenu items. It removes the current suite from the menu bar and installs a new one.
This is an empty copy of the Suites submenu.
No objects other than the below should be stored in this table.
Contains the address of the COM-exposed methods table, usually user.com.
This table contains the paths Frontier searches when resolving an address.
When Frontier is shutting down, all scripts in this table are called. However, users should not store shutdown scripts in this table, but instead store them in user.callbacks.shutdown.
When Frontier is starting up, all scripts in this table are called. However, users should not store startup scripts in this table, but instead store them in user.callbacks.startup.
This table is for temporary storage. This table is empty when Frontier starts up, as items in this table are never saved to disk.
Several Frontier applications, such as mainResponder, use this table to store temporary data.
Glue scripts for scripting other applications.
On Windows this ships empty, but on Macintosh it contains glue for web browsers, FTP clients, BBEdit, FileMaker, Eudora, WebSTAR, and more.
This table contains most of Frontier's built-in verbs.
See the DocServer website for documentation.
Highlights of this table include:
system.verbs.builtins.html: website framework
system.verbs.builtins.webserver: webserver framework
system.verbs.builtins.inetd: TCP server framework
system.verbs.builtins.tcp: TCP scripting verbs
system.verbs.builtins.xml: XML verbs
This contains a table of colors with their hex values.
Constants used in scripts: lf, cr, tab, and the names of the months in English.
"One-word" Frontier verbs, such as getBinaryType, edit, msg, and so on.
Apple event handlers. This is the Macintosh equivalent of user.com.
CGI events are handled by system.verbs.traps.www[omega].sdoc.
The user table contains preferences and data.
Preferences for backing up Frontier.root.
Batch Exporter preferences.
These scripts take one parameter, a title. The title parameter is the full path to window's file, or window name if unsaved. If this script returns false, Frontier does not close the window.
These scripts take one parameter, a name. This is the callback for control-2Clicking in Windows or command-2Clicking on the Macintosh. Name is the string that was double-clicked.
These scripts take one parameter, the address of the script that is not compiled. This script is called by Frontier before closing a script window that has been edited. Return true to have Frontier compile the script before closing the window.
These scripts take one parameter, the string that was selected. On Macintosh this is called when a control-double-click is performed. This isn't used on Windows -- use user.callbacks.cmd2Click instead.
This script takes one parameter, the name of the window being opened. Unlike the closeWindow callback, openWindow is called for all opens, even when script generated. Also unlike closeWindow, an openWindow callback cannot prevent the window from opening. It can hide it to keep it invisible, or change its title before it's shown.
Handles alt-2clicks on Windows and option-2clicks on Macs.
Called when Frontier moves to the foreground. These scripts take no parameters.
These scripts take two paramaters, the path to the window to save and a flag saying whether or not the window should be saved as a runnable desktop script. The path parameter is the full path to window's file, or window name if unsaved. Frontier calls this script to save file objects. The return value should be the (packed) data to be written to disk (by Frontier).
Called when Frontier quits. These scripts take no parameters.
Called when Frontier starts up. All of these scripts run to completion before agents start running. These scripts take no parameters.
Called when Frontier is moved from being the foreground application. These scripts take no parameters.
Frontier scripts exposed to COM via Frontier's COM server.
Storage for suites.custody.
timeOutMinutes: how long until a custody lock expires
The list of currently checked out objects.
Preferences for guest databases.
See the page on user.databases.
Preferences for exporting and importing Frontier objects.
Website framework preferences and storage.
An outline, the list of changed pages.
The global website glossary.
The global images table.
An outline, a list of macro errors, if your prefs specify logging to this outline.
Global website macros. User-written macros that are used in multiple websites can be stored here.
Preferences for the HTML menu.
The top level of the #directives hierarchy.
Outline renderers. User-written renderers may be stored here as well as UserLand-supplied renderers.
FTP sites. This is largely obsolete: use the #ftpSite directive instead to store site location information.
Website templates. This is largely obsolete: use the #template object and #templates table in your websites to store templates.
Settings for inetd servers. Frontier ships with an HTTP server that's configured in this table, at user.inetd.config.http.
Table of open listens for inetd servers. This table is maintained by Frontier and shouldn't be edited.
Global inetd server prefs.
Frontier maintains this flag: when it's set to true, all inetd servers are stopped.
If your preferences specify that logging should go to outlines, then those outlines are stored in this table.
Preferences for logging.
Your Bookmarks menu.
The custom menu, the one that bears the initials of the user.
Preferences for editing Frontier objects in external applications such as BBEdit and the MacBird card editor.
Storage for the People suite's users, groups, and services.
This should not be edited directly, but rather via the People verbs and the People based web-admin.
Various user preferences.
True if agents are running.
Append file suffixes when exporting Frontier objects. (Mac-only.)
Settings for the Main menu's Common Styles submenu.
Contains a list of month names in English.
Storage for various dialog boxes.
True if this is the first time this copy of Frontier has been launched.
Don't set this to true.
Default font settings for new objects.
Obsolete. Specifies to log to the file system rather than to outlines.
The user's initials.
The email address of the user.
The SMTP mail host of the user.
The user's name.
A boolean: if true, the About Window is opened on startup.
Preferences for the Find dialog box.
The Frontier serial number. If this is the Trial version, it will be empty.
The path to the external text editor.
Preferences for root updates.
Subtables for each database that the user subscribes to.
Settings for Frontier's built-in scheduler.
Tasks that run every minute.
Task that run once an hour.
The scheduler log.
Tasks that run once a night.
The main scheduler tasks table.
Preferences for web browser scripting.
Also includes user.webBrowser.proxy, proxy settings for Frontier's HTTP client (tcp.httpClient).
Contains the name of the current server.
Preferences for servers the user has access to via WebEdit.
Settings, data, and scripts for Frontier's webserver framework.
Action scripts -- used when running Frontier behind a Mac OS server such as WebSTAR.
Callbacks that allow for filtering of .fcgi -- classic, old-style -- CGI scripts.
Table of storage for .fcgi CGIs.
Filters that run after a request has been run.
Filters that run before a request is handled.
Global webserver preferences.
Username and password protection via realms.
Webserver responders -- scripts that handle incoming HTTP requests and build a response.
Statistics about the webserver: number of hits and so on.
User storage for utility scripts relating to the webserver.
The websites table contains website source. With Frontier 6, it's recommended that websites are stored in guest databases, in the www folder that's in the Guest Databases folder. However, you may continue to use the websites table to store websites.
Sample pages that show some of the features of the website framework.
A small sample site, an earlier version of www.userland.com, that demonstrates some website framework concepts and features.
The workspace is the user's space for scripts and data. Unlike the scratchpad or system.temp table, it's safe to store items here permanently.
With Frontier 6, it's recommended that you store your scripts and data outside Frontier.root, in guest databases. However, you may continue to use the workspace table.
This is an outline, the user's notepad.
To open it, type ctrl-Y (Windows) or cmd-Y (Macintosh).
Frequently Asked Questions
Use the Jump command, ctrl-j (cmd-j on Macs), and type in the dialog box the address you want to jump to.
Frontier macros such as imageRef, frontierLogo, and so on are stored at html.data.standardMacros.
Other macros are stored at user.html.macros -- and you can store your own macros here, too, as well as in your websites themselves.
Frontier's built-in outline renderers are stored at user.html.renderers. You can store your own renderers here, too, or in the #tools table of your websites.
The recommended location is in a guest database in the www folder that's in the Guest Databases folder. You can also store them in the websites table at the top level of Frontier.root.
Save A Copy.
It depends on what type of scripts they are. Website scripts go in the #tools table of your websites. Other types of scripts may be stored in the workspace table. You can also create suites of related scripts and store them in the suites table. You can store scripts in your own guest databases.