Documentation Archive Developer
Search
Table of Contents Previous Section

Create a new application directory

The first step to creating the guest book application is to create a directory for it. A WebObjects application is always contained in a single directory that has the extension .woa. For the application to run, this directory must be under your HTTP server's document root (specifically under the WebObjects subdirectory) so that your server can access it. WebObjects Builder helps you set the application directory up correctly.

  1. Choose File New Application.

    The panel that appears shows you the contents of the directory <DocumentRoot>/WebObjects. <DocumentRoot> is your HTTP server's document root, which you specified when you installed WebObjects.

  2. Type GuestBook as the file name, and click Save.

WebObjects Builder opens two windows: an application window, which represents the contents of the GuestBook.woa directory, and an empty editing window labeled Main.wo.

You no longer need the untitled document, so you can close it at any time.

A closer look

The application window shows you what the application directory contains. When first created, all that the application directory contains is a directory named Main.wo. Main.wo is a component. Components define dynamic HTML pages and are the basic building blocks of a WebObjects application. The first component in an application is called Main.wo.

There are three parts to a component: an HTML template, a script, and bindings between the two. You use WebObjects Builder to create these three parts. The section "Components" in the introduction to the WebObjects Developer's Guide describes other things that can go into a component.

Usually applications contain several components, each representing all or part of a page. The GuestBook application, however, only has a single page, which is represented by the Main component. The rest of this tutorial describes how to edit the Main component.

To learn how to set up more complex applications, see "Setting up Applications" in Using WebObjects Builder. For more background on WebObjects applications and what they can contain, see "The Ingredients of a WebObjects Application" in the introduction to the WebObjects Developer's Guide.

Table of Contents Next Section