|
|
|
This chapter contains guidelines and tips for designing Forms applications for Web deployment. It includes the following sections:
Here are some general guidelines for designing applications for Web deployment:
Here are some tips for designing Forms applications for Web deployment. They are discussed in greater detail in the following sections:
Consider creating your own HTML file templates (by modifying the templates provided by Oracle). By doing this, you can hard-code standard Forms Client applet parameters and parameter values into the template. Your template can include standard text, a browser window title, or images (such as a company logo) that would appear on the first Web page users see when they run Web-enabled forms. Adding standard parameters, values, and additional text or images reduces the amount of work required to customize the template for a specific application. To add text, images, or a window title, simply include the appropriate tags in the template HTML file.
As you deploy additional applications on the Web, try creating a single HTML page to serve as a centralized menu for your various Web-enabled applications. This approach eliminates the need to broadcast the URL of every application you deploy or remove. As you change your roster of available applications, simply modify the collection of links on the Web menu. Users then contact the menu URL and select from the list of available applications.
Form Services supports forms generated by Oracle Designer (32-bit, Release 1.3.2 or higher). If you use the standard Oracle Designer forms generator templates (ofg4pc1t.fmb and ofg4pc2t.fmb) to generate form and menu definitions, you can use the Form Services to compile .FMX and .MMX files and immediately run the applications on the Web.
To cut down on the number of network roundtrips required for users to operate your Form Builder applications on the Web, consider reducing or eliminating the following Form Builder features in your applications:
Wherever possible, reduce the number of image items and background images displayed in your applications. Each time an image is displayed to application users, the image must be downloaded from the application server to the user's Web browser.
To display a company logo with your Web application, include the image in the HTML file that downloads at application startup. Do this instead of including it as a background image in the application. As a background image it must be retrieved from the database or filesystem and downloaded repeatedly to users' machines.
Most fonts are not supported across all platforms. For example, Sans Serif is a commonly-used font in Microsoft Windows applications; however, Sans Serif is not available in UNIX. When a font is not available on a platform, Form Builder attempts to use a similar font. As a result, when designing forms to deploy on the Web, be sure to follow the font guidelines listed below.
At runtime, Form Services maps a form's fonts into their Java equivalents. Java then renders the font in a font pre-defined for the deployment platform. To convert your form's fonts into Java equivalents, Java uses an alias list, located in the file called Registry.dat.
The following table lists the Java fonts and their equivalents on the major deployment platforms:
If a font from your form does not map to a Java font (through the Form Builder font alias table), Java automatically assigns a Java font to the unmapped application font.
This section explains how to specify the default location and search paths for icons and images.
When deploying a Forms application on the Web, the icon files in ICO format (specified for an iconic button, a menu, or a window) are not used. The only file formats accessible through the Web are GIF or JPG files (GIF is the default format).
By default, the icons are found relative to the DocumentBase Directory, which is the directory containing the HTML file. If you want to store your icons in another location, you have to create an application file to specify the virtual directory where the icon files reside and the file format they use (GIF or JPG). This application file must be referenced in the HTML file.
To create a custom application file:
To reference the application file in the HTML file:
In the formsweb.cfg file or your HTML file, modify the value of the serverApp parameter and set the value to the location and name of your application file.
<PARAM NAME="serverApp" VALUE="/appfile/myapp">
(for an absolute path)
or
<PARAM NAME="serverApp" VALUE="appfile/myapp">
(for a relative path, relative to the CodeBase directory)
When you deploy your applications to the Web, you have the ability to specify a splash screen image (displayed during the connection) and a background image file.
Those images are defined in the HTML file or in the formsweb.cfg file:
<PARAM NAME="splashScreen" VALUE="splash.gif"> <PARAM NAME="background" VALUE="back.gif">
The default location for the splash screen and background image files is in the DocumentBase directory containing the base HTML file.
Each time you use an icon or an image (for a splash screen or background), an HTTP request is sent to the Web server. To reduce the HTTP roundtrips between the client and the server, you have the ability to store your icons and images in a Java archive (JAR) file. Using this technique, only one HTTP roundtrip is necessary to download the JAR file.
The SunSoft JDK comes with an executable called jar. This utility enables you to store files inside a Java archive. See www.java.sun.com for further information.
For example:
jar -cvf myjar.jar Splash.gif Back.gif icon1.gif
This command store three files (Splash.gif, Back.gif, icon1.gif) in a single JAR file called myjar.jar.
The default search path for the icons and images is relative to the DocumentBase. However, when you want to use a JAR file to store those files, the search path must be relative to the CodeBase directory, the directory which contains the Java applet.
If you want to use a JAR file to store icons and images, you must specify that the search path is relative to CodeBase using the imageBase parameter in the base HTML file.
This parameter accepts two different values:
In this example, we use a JAR file containing the icons and we specify that the search should be relative to CodeBase. If the parameter "imageBase" is not set, the search is relative to DocumentBase and the icons are not retrieved from the JAR file.
For example:
<PARAM NAME="archive" VALUE="icons.jar">
<PARAM NAME="imageBase" VALUE="CodeBase">
The icons and images search path depends on:
Form Services searches for the icons depending on what you specify. This example assumes :
The default search path is relative to the DocumentBase. In this case, you do not need to specify the imageBase parameter:
Use the imageBase=CodeBase parameter in the base HTML file to enable the search of the icons and images in a JAR file:
To invoke Reports from a Web-enabled form, use the RUN_PRODUCT built-in subprogram.
To use RUN_PRODUCT to run a report from a form running on the Web, you must set three environment variables:
On Windows NT, you define your environment variables in the Registry. On UNIX, you define your environment variables in the command shell. For more information on setting up environment variables, refer to Appendix A, "Form Services Parameters".
After you set the environment variables above, the following sequence occurs automatically when a form running on the Web calls RUN_PRODUCT to invoke Reports.
If the output format of the report is SCREEN or PREVIEW:
If the output format of the report is FILE:
When designing forms for eventual deployment on the Web, keep in mind that certain Forms features behave differently--or not at all--when a form is deployed on the Web. Table 7-5 lists Forms features, whether the feature is supported on the Web, and any guidelines or notes about the feature.
|
Copyright © 2000 Oracle Corporation. All Rights Reserved. |
|