Skip Headers
Oracle® HTML DB User's Guide
Release 2.0

Part Number B16373-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

11 Deploying an Application

This section describes how to deploy an application.

This section contains the following topics:

About the Oracle HTML DB Application Development Life Cycle

When developing applications using Oracle HTML DB, you need to find a balance between two dramatically different development methodologies:

The first approach offers so much flexibility, you run the risk of never completing your project. In contrast, the second approach can yield applications that do not meet the needs of end users even if they meet the stated requirements on paper.

System Development Life Cycle Methodologies to Consider

The system development life cycle (SDLC) is the overall process of developing software using a series of defined steps. There are a number of SDLC models that work well for developing applications in Oracle HTML DB.

The SDLC waterfall is probably the best known model. In this methodology, the development process is broken down into the following stages:

  1. Project Planning

  2. Requirements Definition

  3. Design

  4. Development

  5. Integration and Testing

  6. Installation and Acceptance

  7. Maintenance

This methodology is referred to as a waterfall since the output from one stage is the input for the next stage. One of the primary problems with this approach is that it is assumed that all requirements can be established in advanced. Unfortunately, in the real world, requirements often change and evolve during the development process.

The Oracle HTML DB development environment enables developers to take a more iterative approach to development. Unlike many other development environments, creating prototypes is easy. With Oracle HTML DB, developers can:

  • Use built-in wizards to quickly design an application user interface

  • Easily make protoypes available to users and gather feedback

  • Implement changes in real time, creating new prototypes instantly

Other methodologies what work well with Oracle HTML DB include:

  • Spiral - This approach is actually a series of short waterfall cycles. Each waterfall cycles yields new requirements and enables the development team to create a robust series of prototypes.

  • Rapid application development (RAD) life cycle - This approach has a heavy emphasis on creating a prototype that closely resembles the final product. Essentially the prototype is an essential part of the requirements phase. One disadvantage of this model is that the emphasis on prototyping can lead to scope creep. Developers can lose sight of their initial goals in the attempt to create the perfect application.

About Deploying an Application in Oracle HTML DB

Deploying an application from one Oracle HTML DB instance to another is a two step process:

Deployment Options to Consider

When you develop an application in Oracle HTML DB, you create the application within a specific workspace. Each workspace has an unique ID and name. A common scenario is to create the application in a development instance and then deploy it to a production instance.

During the deployment process you would need to decide whether to use the existing application ID, the existing workspace, the existing database, or the existing Oracle HTTP Server, or create new ones. Deployment options to consider include:

  1. Do nothing. Send the URL and login information to users. This approach works well for applications with a small and tolerant user population.

  2. Same workspace and same schema. Export and then import the application and install it using a different application ID. The approach works well when there are few changes to the underlying objects, but frequent changes to the application functionality.

  3. Different workspace and same schema. Export and then import the application into a different workspace. This is an effective way to prevent a production application from being modified by developers.

  4. Different workspace and different schema. Export and then import the application into a different workspace and install it using a different schema.

  5. Different database with all its variations. Export and then import the application into a different Oracle HTML DB instance and install it using a different schema and database.

Whether to Copy the Workspace

Whether to copy an existing workspace really is a matter of preference. Keep in mind that the production version must have access to all the appropriate objects. For example, you might want to copy a workspace in the following situations:

  • When the application subscribes to other objects within the workspace.

  • When the application relies on Oracle HTML DB authentication. Copying the workspace would automatically migrate all the required user data.

Whether to Copy the Database

When determining whether to copy the database, remember that the schema against which the application runs must have access to the same objects as the development instance. The actual name of the schema is unimportant. You can change it during the import process.

About the Application ID

It is not necessary to have matching application IDs for a development version and production version of an application. In fact, as a best practice never hard code the application ID into your application. Instead use the application alias (defined on the Edit Application Attributes page), or use a built-in substitution string (such as APP_ID and APP_ALIAS). Using a substitution string is the best approach since it enables you to change the application ID without impacting any application functionality.


See Also:

"Name" for information about defining an application alias and "Built-in Substitution Strings" for information about using APP_ID and APP_ALIAS

Whether to Install a New Oracle HTTP Server

Installing Oracle HTML DB off the Companion CD loads a new Oracle HTTP Server in a separate Oracle home. Additionally, the installer properly configures Oracle HTTP Server with a mod_plsql database access descriptor (DAD) and creates all virtual directory mappings.

Using a different Oracle HTTP Server configuration requires additional configuration. For example, you might want to:

  • Use a different Oracle HTTP Server from the one that installs with Oracle HTML DB

  • Use the Oracle HTTP Server that installs with Oracle Application Server release 10g

  • Use the Oracle HTTP Server that installs with Oracle9i Application Server

All of these scenarios require you manually configure the mod_plsql DAD and map the directory from which Oracle HTML DB retrieves images.

You can also have a single Oracle HTTP Server serve pages for multiple Oracle HTML DB instances. In this configuration, all Oracle HTML DB instances must be the same version, map to the same image directory, and have a unique mod_plsql DAD.


See Also:

Oracle HTML DB How To Documents section of Oracle Technology Network for information about implementing these configurations

How to Deploy an Application to Another Oracle HTML DB Instance

Whether you want to move an application to another workspace or just make a copy of it, the deployment process involves the following steps:

  1. Move the supporting database objects (if appropriate). Review the Database Dependencies report to determine what objects to move. See "About the Database Object Dependencies Report".

  2. Export the application definition and all related files. See "Exporting an Application and Related Files".

  3. Import the exported files into the target Oracle HTML DB instance. See "Importing Export Files".

    Note that if the target instance is a different schema, you also need to export and import any required database objects.

  4. Install the exported files from Export Repository. See "Installing Export Files".

You can import an application into your workspace regardless of the workspace in which it was developed.

About Managing Database Objects

Before you export an application and the appropriate related files, you need to determine if you also need to migrate the database objects referenced by the application. If you are unsure of which database objects to move, review the Database Object Dependencies report.

If the target Oracle HTML DB schema is different from the schema used in the development environment, you will need to migrate the database objects referenced by the application. In many cases this process can be as simple as using Oracle database export and import utilities to copy the application schema from the development environment to target Oracle HTML DB instance. The following are two common scenarios where this approach will not work:

  • When the object development schema refers to tablespaces to which the target instance schema does not have access

  • When the development instance schema has sample data that you do not to want migrate to the target instance schema

If a database administrator or an Oracle HTML DB administrator is the person responsible for exporting Oracle HTML DB applications, be sure to clearly communicate if he or she:

  • Should include all data when exporting your application

  • Should not include data from specific tables you identify

Exporting an Application and Related Files

You export and import application definitions and all associated files using the Workspace, Application, CSS, Images, Script Files, Themes, and User Interface Defaults buttons located at the top the Export page.

Topics in this section include:

Exporting an Application

When you export a application, Oracle HTML DB generates a text file containing PL/SQL API calls.

To export an application:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Application Builder home page, click Export/Import.

  5. When prompted to select a task, select Export and click Next.

  6. From File Format, select how rows in the export file will be formatted:

    • Choose UNIX to have the resulting file contain rows delimited by line feeds.

    • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

  7. From Build Status Override, select one of the following:

    • Run Application Only - Developers can only run an application

    • Run and Build Application - Developers can both run and edit an application

    Selecting Run Application Only is an effective way to protect an application from modifications from other developers. Note that if you select Run Application Only you cannot set the argument p_trace to Yes. Also, be aware that once you override the Build Status, you can only change it in Oracle HTML DB Administration Services.

  8. Use the As of field to export your application as it was previously defined. Specify the number of minutes in the field provided.

    This utility uses the DBMS_FLASHBACK package. Because the timestamp to System Change Number (SCN) mapping is refreshed approximately every five minutes, you may have to wait that amount of time to locate the version you are looking for. The time undo information is retained and influenced by the startup parameter UNDO_RETENTION (the default is three hours). However, this only influences the size of the undo tablespace. While two databases may have the same UNDO_RETENTION parameter, you will be able to go back further in time on a database with fewer transactions since it is not filling the undo tablespace, forcing older data to be archived.

  9. Click Export Application.

In addition to exporting the actual application file, you may also need to export other related files such cascading style sheets, images, and script files.

Exporting a Page in an Application

You can export a specific page within an application by clicking the Export button on the Page Definition. When exporting a page, remember the following:

  • Exported pages can only be imported sucessfully if they have the same application ID and workspace ID.

  • Some pages may reference shared components. To export all pages within an application as well as application shared components, you need to export the entire application.

To export a page in an application:

  1. Navigate to the appropriate Page Definition:

    1. Navigate to the Workspace home page.

    2. Click the Application Builder icon.

    3. Select an application.

    4. Select a page.

      The Page Definition appears.

  2. On the Page Definition, click Export at the top of the page.

  3. From Page, select the page to be exported.

  4. From File Format, select how rows in the export file will be formatted:

    • Choose UNIX to have the resulting file contain rows delimited by line feeds.

    • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

  5. Use the As of field to export a page as it was previously defined. Specify the number of minutes in the field provided.

    This utility uses the DBMS_FLASHBACK package. Because the timestamp to System Change Number (SCN) mapping is refreshed approximately every five minutes, you may have to wait that amount of time to locate the version you are looking for. The time undo information is retained and influenced by the startup parameter UNDO_RETENTION (the default is three hours). However, this only influences the size of the undo tablespace. While two databases may have the same UNDO_RETENTION parameter, you will be able to go back further in time on a database with fewer transactions since it is not filling the undo tablespace, forcing older data to be archived.

  6. Click Export Page.

Exporting Cascading Style Sheets

Use the Export Cascading Style Sheets utility to export cascading style sheets you imported.

To export related cascading style sheets:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Application Builder home page, click Export/Import.

  5. When prompted to select a task, select Export and click Next.

  6. Click CSS at the top of the page.

  7. On the Export Cascading Style Sheets page:

    1. Select the cascading style sheets

    2. From File Format, select how rows in the export file will be formatted:

      • Choose UNIX to have the resulting file contain rows delimited by line feeds.

      • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

  8. Click Export Style Sheets.

Exporting Images

Use the Export Images utility to export images you have imported.

To export related images:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Application Builder home page, click Export/Import.

  5. When prompted to select a task, select Export and click Next.

  6. Click Images at the top of the page.

  7. On the Export Images page:

    1. Select an application from which to export images.

      Be aware that selecting Workspace Images only exports those images in your repository that are not associated with a specific application. If all of your images are associated with specific applications then the workspace image export file will be empty.

    2. From File Format, select how rows in the export file will be formatted:

      • Choose UNIX to have the resulting file contain rows delimited by line feeds.

      • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

  8. Click Export Images.

Exporting Static Files

Use the Export Static Files utility to export static files you have imported.

To export related static files:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Application Builder home page, click Export/Import.

  5. When prompted to select a task, select Export and click Next.

  6. Click Files at the top of the page.

  7. On Export Static Files:

    1. Select the files to be exported.

    2. From File Format, select how rows in the export file will be formatted:

      • Choose UNIX to have the resulting file contain rows delimited by line feeds.

      • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

  8. Click Export File(s).

About Importing into Another Oracle HTML DB Instance

Note that you cannot use Web interface described in this section to import exported static files into another Oracle HTML DB instance. To import exported static files into another Oracle HTML DB instance, use SQL*Plus while connected as the Oracle HTML DB database user. Note that you must export from and to a workspace having the same name and workspace ID.

Exporting Script Files

You can transfer selected scripts from your current Script Repository to a Script Repository in a different Workspace by using the Export and Import tasks.

To export script files:

  1. Navigate to the Workspace home page.

  2. Click SQL Workshop.

  3. Click SQL Scripts.

  4. From the Tasks list, select Export.

  5. Select the appropriate script files and click Add to Export.

  6. Review the file name and click Export All.

    Select the Remove check box to remove the script.

Exporting Themes

Use the Export Theme utility to export themes from one Oracle HTML DB development instance to a file.

To export an application theme from the Export page:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Application Builder home page, click Export/Import.

  5. When prompted to select a task, select Export and click Next.

  6. Click Themes at the top of the page.

  7. On the Export Application Theme page:

    1. Select the theme to be exported.

    2. From File Format, select how rows in the export file will be formatted:

      • Choose UNIX to have the resulting file contain rows delimited by line feeds.

      • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

  8. Click Export Theme.

To export an application theme from the Themes page:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Application Builder home page, click Shared Components.

  5. Under User Interface, select Themes.

    The Themes page appears.

  6. From the Tasks list, select Export Theme.

    The Export page appears.

  7. Click Themes at the top of the page.

  8. On the Export Application Theme page:

    1. Select the theme to be exported.

    2. From File Format, select how rows in the export file will be formatted:

      • Choose UNIX to have the resulting file contain rows delimited by line feeds.

      • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

  9. Click Export Theme.


See Also:

"Managing Themes"

Exporting User Interface Defaults

Exporting User Interface Defaults is useful when you plan to develop on the target machine.

When you export User Interface Defaults, all User Interface Defaults for the selected schema are exported to a single SQL*Plus script. When prompted, save this file to your hard drive. The file contains an API call to create table hints by making calls to the application PL/SQL API. You can use this file to import User Interface Defaults to another database and Oracle HTML DB instance.

To export User Interface Defaults from the Export page:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Application Builder home page, click Export/Import.

  5. When prompted to select a task, select Export and click Next.

  6. Click User Interface Defaults at the top of the page.

  7. On the Export User Interface Defaults page:

    1. From Schema, select the schema that owns the table associated with the User Interface Defaults.

    2. From File Format, select how rows in the export file will be formatted:

      • Choose UNIX to have the resulting file contain rows delimited by line feeds.

      • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

  8. Click Export.

To export User Interface Defaults from the User Interface Defaults page:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Application Builder home page, click Shared Components.

  5. Under User Interface, select User Interface Defaults.

    The User Interface Defaults page appears.

  6. Click Export.

    The Export page appears.

  7. Click Themes at the top of the page.

  8. On the Export User Interface Defaults page:

    1. From Schema, select the schema that owns the table associated with the User Interface Defaults.

    2. From File Format, select how rows in the export file will be formatted:

      • Choose UNIX to have the resulting file contain rows delimited by line feeds.

      • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

  9. Click Export.

Importing Export Files

Once you export an application and any related files, you need to import them into the target Oracle HTML DB instance before you can install them. As a general rule, always import the application first and then the related files.

To import an application and related files:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Application Builder home page, click Export/Import.

  5. When prompted to select a task, select Import and click Next.

  6. On Import File:

    1. In Import file, specify the file you are importing.

    2. From File Type, select the type of file you are importing.

      Once you have imported a file, you have the option to install it. You can also install it later from the Export Repository.

    3. Verify that File Character Set is correct.

    4. Click Next.

  7. To install an imported file, click Install. On the Application Install page:

    1. From Parse As Schema, select a schema.

      This is the schema against which all of the application's SQL and PL/SQL will be parsed.

    2. From Build Status Override, select one of the following:

      • Run Application Only - Users can only run an application.

      • Run and Build Application - Users can run an application and developers can both run and edit an application

      Selecting Run Application Only is an effective way to protect an application from modifications from other developers. Be aware that once you override the Build Status, you can only change it in Oracle HTML DB Administration Services.

    3. From Install As Application, select one of the following:

      • Auto Assign New Application ID

      • Reuse Application ID From Export File

      • Change Application ID

      Use these options to avoid application ID conflicts. These options come in handy when you need to have two versions of the same application in the same instance. For example, you might be migrating an application to a production instance, but still need to maintain development version.

    4. Click Install Application.

Installing Export Files

There are two ways to install export files:

Topics in this section include:

Installing Files from the Export Repository

After you import files into the target Oracle HTML DB instance, you must install them before they can become active or available in Application Builder.

To install files stored in the Export Repository:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Application Builder home page, click Export/Import.

  5. Select View Repository on the bottom of the page.

  6. Select the file to be installed and click Install in the Action column adjacent to the appropriate file.

    1. From Parse As Schema, select a schema.

      This is the schema against which all of the application's SQL and PL/SQL will be parsed.

    2. From Build Status, select one of the following:

      • Run Application Only

      • Run and Build Application

      Select Run Application Only to run the application in the target instance, but make it inaccessible to developers. See "Changing Application Build Status" .

    3. From Install As Application, select one of the following:

      • Reuse Application ID from Export File

      • Auto Assign New Application ID

      • Change Application ID

      Use these options to avoid application ID conflicts. These options come in handy when you need to have two versions of the same application in the same instance. For example, you might be migrating an application to a production instance, but still need to maintain development version.

    4. Click Install Application.

In addition to installing files, you can also use this page to delete a file from the Export Repository.

To delete a file from the Export Repository:

  1. Navigate to the Export Repository.

  2. Select the file to be deleted Delete Checked.

Installing Export Files from SQL*Plus

You can also install export files from SQL*Plus. Note there are two restrictions:

  • The export file must originate from the same workspace as the one into which you are installing.

  • If the export file is an application, the application ID will be overwritten. Therefore, the target workspace must own the ID of the application being installed.

Topics in this section include:

Verifying If Source and Target Workspace IDs Are Identical

You can verify that the source and target workspace IDs are identical by running query in SQL Command Processor.

To verify that the source and target workspace IDs are identical:

  1. Log in to the source workspace.

  2. Click the SQL Workshop icon on the Workspace home page.

  3. Click SQL Commands.

  4. Enter the following in the SQL editor pane and click Run.

    SELECT &WORKSPACE_ID. FROM DUAL
    
    
  5. Make note of workspace ID.

  6. Log in to the target workspace.

  7. Repeat steps 2 through 5 to verify the workspace IDs match.

Using SQL*Plus to Install Export Files

To install Oracle HTML DB export files from SQL*Plus:

  1. Log in to SQL*Plus as a user account that has access to your workspace (in other words, the workspace has been mapped to the schema).

  2. Run the export file.

    For example, if your export file is names f144.sql by default, you would type @f144 at the command prompt.

About Publishing the Application URL

Once you have deployed your application, loaded data, and created users, you can publish your production URL.

You can determine the URL to your application by positioning the mouse over the Run icon on the Application home page. The URL displays in the status bar at the bottom of the page.

The Run icon gets its value from the Home link attribute on the Edit Security Attributes page. This link is only referenced by this icon and by applications that do not use the Oracle HTML DB Login API. Consider the following example:

http://htmldb.oracle.com/pls/otn/f?p=11563:1:3397731373043366363

Where:

To run this example application, you would use the URL:

http://htmldb.oracle.com/pls/otn/f?p=11563:1

When each user logs in, he or she will receive an unique session number.

Using Build Options to Control Configuration

Build options enable you to conditionally display specific functionality within an application.

Build options have two possible values: INCLUDE and EXCLUDE. If you specify an attribute as being included, then the HTML DB engine considers it part of the application definition at run time. Conversely, if you specify an attribute as being excluded then the HTML DB engine treats it as if it does not exist.

Topics in this section include:

Creating Build Options

To create a build option:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Application Builder home page, click Shared Components.

  5. Under Logic, select Build Options.

  6. To create a new build option, click Create.

  7. Follow the on-screen instructions.

You can choose to enable or disable a build option on the appropriate attributes page. Most attributes pages contain a Configuration section where you can select defined build options.


See Also:

"Configuring Standard Application Attributes" and "Editing Page Attributes" for information about specifying build options

About the Build Options Page

Once you create a build option, it appears on the Build Options page. You control how the Build Options page displays by making a selection from the View list. Available options include:

  • Icons (the default) displays each build option as a large icon. To edit a build option, click the appropriate icon.

  • Details displays each build option as a line in a report. Each line includes the application ID, build option name, status, and a link to the Build Option Utilization report. To edit a build option, click the appropriate name.

Viewing the Build Option Utilization Report

Once you create a build option, a Utilization button appears on the Build Options page. This report details build option utilization in the current application.


Note:

The Utilization button only appears on the Build Options page after you create a build option.

To view the Build Option Utilization report:

  1. Navigate to the Build Options page:

    1. Navigate to the Workspace home page.

    2. Click the Application Builder icon.

    3. Select an application.

    4. On the Application Builder home page, click Shared Components.

    5. Under Logic, select Build Options.

      Build Options page appears.

  2. On the Build Options page, click Utilization.

    The Build Option Utilization report appears.