PATH  WebObjects 4.0 Documentation > What's New in WebObjects 4.0

Table of Contents Previous Section

Converting an Existing WebObjects Application

To convert a project to WebObjects 4.0, do the following:

  1. Convert your project's makefiles as described in the document $NEXT_ROOT/Developer/Makefiles/Conversion/DirectoryLayout/ConvertMakefilesReadMe.rtf.

    ($NeXT_ROOT is the root installation directory specified when WebObjects was installed.) The project files must change to point to new locations for the build tools. The ConvertMakefilesReadMe.rtf document tells you how to make those changes.

  2. If your project contains Java code files, convert them as described in Converting Java Code.
Note: The Java APIs have changed considerably. If you've written Java code, you must convert it before you can compile.

  1. Open your project in Project Builder, and click "Upgrade Now" when prompted.

    Among other things, upgrading your project in this fashion will:

    - Upgrade your PB.project file to the latest version.

    - Upgrade your makefiles to the latest versions.

    - Convert your WebObject project suitcases to the new format.

    - Convert your project so that it conforms to the new localization scheme. As a result of this, script (.wos) and .api files are moved outside of their component (.wo) directories. Script files now appear in the Classes suitcase. For more information on the new localization scheme, see the section Changes to Localization.

  2. Build. If errors occur during the build, fix them and re-build the project.

    The WebObjects Framework contains many new optimizations that should greatly improve your application's performance. However, you may find your code relied on some part of the request-response loop or template parsing code that is no longer always performed.

  3. Run the project. If your application doesn't run as expected, read the sections Troubleshooting WebObjects 4.0 Template Parsing, Troubleshooting WebObjects 4.0 Request Handling, and WebScript Changes. Among other things, these sections outline the use of WebObjects 3.5 compatibility flags that allow you to revert to the style of template parsing and request handling that was performed in WebObjects 3.5.

  4. At this stage, if you want, you can remove all usage of deprecated API. WebObjects has been rewritten to be thread-safe, which required deprecating some of the existing APIs. You can still use deprecated API as long as you do not enable multithreading in your application. You'll receive warnings about deprecated API at run-time. For a complete list of what's deprecated, see Support for Multithreaded Applications.

Table of Contents Next Section