Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > Getting Started With WebObjects


   

Examining Your Project

Project Builder displays a browser showing the contents of your project. The first column lists several categories of files that your project may contain. This section describes some of the most important files you'll use.

  1. Select Web Components.

    The next column displays a list with one element, Main.wo, which is a directory containing the first component in your application. Every application starts with a component called Main.

  2. Select Main.wo.

    The files you see displayed in the next column are some of the files you work with when developing your component:

    • Main.html is the HTML template for your page. It can include tags for dynamic WebObjects elements as well as regular HTML. Typically, you do not edit this file directly; you create your page's elements graphically using WebObjects Builder.

    • Main.wod is the declarations file that specifies bindings between the dynamic elements and variables or methods in your scripts. Normally, you don't edit this file directly; you use WebObjects Builder to generate the bindings for you.

    • Select Classes in the first column of the browser.

    You'll see these files listed in the second column:

    • Main.java is a file that allows you to specify behavior associated with the component. You do this by writing code in Java (since you specified Java as the language when you created the project). You use Project Builder to edit this file.

    • Application.java and Session.java are other Java files that you may want to work with. Application.java defines application variables that live as long as the application does. Session.java defines session variables that exist for the lifetime of one user's session. In Chapter 2, you'll add code to Application.java and learn more about application and session variables.

    • DirectAction.java defines a subclass of WODirectAction that you use as a container class for your action methods. You can rename this class or create multiple subclasses of WODirectAction depending on your application needs.

© 1999 Apple Computer, Inc. – (Last Updated 24 Aug 99)