Application directory – Apple WebObjects 3.5 User Manual
Page 24

Chapter 1
What Is a WebObjects Application?
24
where they are used by reading the chapter “WebObjects Viewed Through Its
Classes” (page 63).
Components are subclasses of a class named WOComponent. For example, in
Figure 1 the component directory creates a WOComponent subclass named
Main. Application files create subclasses of a class named WOApplication, and
session files create subclasses of a class named WOSession.
WOComponent, WOApplication, and WOSession are defined, along with other
classes, in the WebObjects Framework in
NeXT_ROOT
/NextLibrary/Frameworks/WebObjects.framework
. (NeXT_ROOT is an
environment variable defined at installation time. On Windows NT systems, it
is
C:\NeXT
by default. On Mach systems, the NeXT_ROOT environment variable is
undefined, but you can think of it as being the root directory
/
.)
In Java, WebObjects classes have different names. The names shown previously
are the WebScript names. (Objective-C uses the same names as WebScript.) In
Java, WOComponent is called Component, WOApplication is WebApplication,
and WOSession is WebSession. The Java classes are contained in the package
next.wo
.
Note:
This book generally uses the WebScript names for classes and methods.
Usually, you can easily discern the Java name from the WebScript name, and
vice versa. The following table tells you how to do so.
Where the mapping is not obvious, this book notes both the Java and
WebScript/Objective-C names.
Application Directory
When you build a WebObjects application project, the result is a directory with
the extension
.woa
. This directory contains the application executable, copies of
the component files, copies of the script files (if any), and any resources that the
application or the HTTP server needs access to. When you’re ready to deploy
an application to your users, you use the
.woa
to run the application.
WebScript/Objective-C Name
Java Name
Class names
WOClass
Class (or
next.wo.
Class)
Zero-argument methods
method
method
Single-argument methods
method
:
method
Multiple-argument
methods
methodWithArg1
:
arg2
:
methodWithArg1