In Chapter 3, we discussed Oracle Forms and their development. Oracle Forms is an extremely robust environment that incorporates all of the modern components that users have come to expect from applications. In a sign that Oracle acknowledges that the client/server architecture model is obsolete, Oracle Forms, from version 9 i onward, does not even have the capability of generating Forms to be deployed in a client/server environment. The sole focus is now on web-based applications. You can still test your Forms locally on your development machine, but testing them requires the developer to run a small web server locally.
The Forms engine (the program that will display your Forms on the Web) included with Oracle Application Server 10 g is 9.0.4. This version corresponds to the Forms Developer version included with Oracle Developer Suite 10 g . Table 6-1 shows the versions associated with each release of the application server.
Application Server Version | Forms Engine Version | Corresponding Development Suite |
---|---|---|
Oracle Application Server 10 g | 9.0.4 | Oracle Developer Suite 10 g |
Oracle 9 i Application Server Release 2 | 9.0.2 | Oracle9 Developer Suite Release 2 v9.0.2 |
Oracle 9I Application Server Release 1 | 6 i | N/A - Forms Developer 6 standalone |
The Forms engine has not changed drastically between these versions, so it is possible to take an Oracle Form developed under one version of Forms and deploy it on an Application Server with a different version of the Forms engine without modifying it (provided that the development machine and the application server are running the same version of the operating system).
Tip | If the Form is developed on one platform (say, Windows) and deployed on another (say, Unix/ Linux), the form MUST be recompiled. |
This can be a risky proposition, however, as features are modified, enhanced, or dropped between versions of Forms. It is also possible (although rare) that a slight difference in operating systems (a developer using a machine with Windows 2000 Service Pack 3 and a server with Windows XP Service Pack 2, for example) will cause unexpected behavior when a Form is moved to the Web and deployed. The safest method is to recompile the Form on the target platform before attempting to access it via the Web. If you choose to recompile your Forms, there are two methods you can follow: recompilation and migration.
Recompilation is the easier of the two. It involves running an executable included with every installation of Oracle Application Server 10 g to recompile your Forms. On Windows, this executable is called ifcmp90; on Unix, it is called f90genm.sh. If no parameters are passed, the Forms Compiler program will come up in display mode, prompting you for the various parameters (this is true on Unix provided you have an X Server running). The parameters can also be entered on the command line, which is very useful if you have numerous forms to recompile and want to put them into a batch file or script (see Figure 6-1).
The parameters the Forms Compiler accepts are shown in Table 6-2.
Parameter | Values | Default Value | Comment |
---|---|---|---|
module_type | FORM / MENU / LIBRARY | FORM | Specifies the type of form component to compile. |
Statistics | YES/NO | NO | Show statistics associated with recompilation? |
Logon | YES/NO | YES | Log on to database before compilation? Note: Because this parameter defaults to YES, you must provide a user /password@connect_string combination if you don t specify logon=no (see examples below). |
Batch | YES/NO | NO | Display compilation messages on screen? |
output_file | <filename> | none | Write output from compilation process to a file. |
Script | YES/NO | NO | Write out a script file? |
Parse | YES/NO | NO | Parse script file? |
Upgrade | YES/NO | NO | Upgrade module to current version? |
upgrade_roles | YES/NO | NO | Upgrade SQL*Menu roles? |
Version | 23,30,40,45,50,60 | 45 | Version to upgrade. |
crt_file | <filename> | none | CRT file for version 2.x upgrade. |
Build | YES/NO | YES | Build runform/runmenu file when upgrading? |
Add_triggers | YES/NO | NO | Add KEY-UP/DOWN triggers during upgrade? |
nofail | YES/NO | NO | Add NOFAIL keyword to trigger steps? |
debug | YES/NO | NO | Build with debug information? |
compile_all | YES/NO | NO | Compile all PL/SQL code? |
Strip_source | YES/NO | NO | Strip PL/SQL source code from library? |
window_state | NORMAL / MAXIMIZE / MINIMIZE | NORMAL | Root window state. |
Help | YES/NO | NO | Show help information? |
options_screen | YES/NO | NO | Display options window? (for bitmap only) |
widen_fields | YES/NO | NO | Add one character to display width? |
print_version | YES/NO | NO | Print version used to save module? |
forms_doc | YES/NO | NO | Print forms documentation report? |
If you have numerous Forms that need to be recompiled, a batch file like this will recompile all forms in whatever directory this batch file is run from (replace username/password@connect_string with the appropriate connection information):
Echo compiling Forms.... for f batch=yes module_type=form compile_all=yes window_state=minimize upgrade=yes ECHO FINISHED COMPILING
On Unix, the equivalent shell script would look like this:
for form in