Table of Contents Previous Section
Deciding to use compiled code
Most WebObjects applications are written entirely in WebScript. However, you might decide that it's better to use compiled code instead. The primary reasons you use compiled code are:
You also might want to provide a compiled subclass of one or more of the classes in the WebObjects Framework. You can subclass the WebObjects classes WOApplication (WebApplication in Java), WOSession (WebSession in Java), and WOComponent (Component in Java) simply by creating a script file. For example, writing methods in Application.wos is the same as subclassing WOApplication. Creating a component is the same as subclassing WOComponent. Usually, the only reason you would create a compiled subclass as opposed to a scripted subclass is to improve performance.
If you write compiled code in Java, the entire application must be written in Java, including the component logic. If you use Objective-C, you can mix Objective-C and WebScript. That is, you can provide part of the application's logic as compiled Objective-C objects, and the rest of the application can be left in WebScript. You can also mix C and C++ code with Objective-C. See the section "Notes for Objective-C Developers" later in this chapter.
Note: Java support is only available on the Windows NT platform.
Table of Contents Next Section