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

Part Number B14303-02
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
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

12 Deploying an Application

This section describes how to deploy an application.

This section contains the following topics:

See Also:

"Advanced Programming Techniques"

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 establish 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 part 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. 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:

"Application Definition" for information on defining an application alias and "Built-in Substitution Strings" for information on using APP_ID and APP_ALIAS

Whether to Install a New Oracle HTTP Server

Installing Oracle HTML DB 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 more information on implementing these configurations

Deploying an Application to Another Oracle HTML DB Instance

To move an application and related files from one instance of Oracle HTML DB to another, you must export the application definition and all associated files. Exporting your application definition is the first step toward deploying it outside of your development environment.

Topics in this section include:

How Exporting an Application Works

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

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 the target Oracle HTML DB instance is different from 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. From the Applications list, select an application.

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

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

  5. From the Application list, select an application

  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 that 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. (See "Viewing a Page Definition".)

  2. From the Applications list, select an application.

    Application Builder appears. The list of pages in the current application appears at the bottom of the page.

  3. From the Pages list, select a page.

    The Page Definition appears.

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

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

  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. 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.

  8. 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. From the Applications list, select an application.

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

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

  5. Click CSS at the top of the page.

  6. 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.

  7. 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. From the Applications list, select an application.

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

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

  5. Click Images at the top of the page.

  6. On the Export Images page:

    1. Select 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.

  7. 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. From the Applications list, select an application.

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

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

  5. Click Files at the top of the page.

  6. On the Export Static Files page:

    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.

  7. Click Export File(s).

Exporting Script Files

Use the Export Script Files utility to export script files from one Oracle HTML DB development instance to another.

To export script files:

  1. Navigate to the Workspace home page.

  2. From the Applications list, select an application.

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

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

  5. Click Script Files at the top of the page.

  6. On the Export Script Files page:

    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.

  7. Click Export Script Files.

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. From the Applications list, select an application.

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

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

  5. Click Themes at the top of the page.

  6. From Export Theme, select the theme to be exported.

  7. Click Export Theme.

To export an application theme from the Themes page:

  1. Navigate to the Workspace home page.

  2. From the Applications list, select an application.

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

  4. Under User Interface, select Themes and Templates.

    The Themes page appears.

  5. From the Tasks list, select Export.

    The Export page appears.

  6. Click Themes at the top of the page.

  7. From Export Theme, select the theme to be exported.

  8. Click Export Theme.

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 by your browser, 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 SQL Workshop:

  1. Click SQL Workshop on the Workspace home page.

  2. Under SQL Workshop, select User Interface Defaults.

  3. From the Tasks list, select Import/Export User Interface Defaults.

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

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

  6. On the 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.

  7. Click Export.

To export User Interface Defaults from the Export page:

  1. Navigate to the Workspace home page.

  2. From the Applications list, select an application.

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

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

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

  6. On the 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.

  7. 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. Always import application first and then the related files.

To import an application and related files:

  1. Navigate to the Workspace home page.

  2. From the Applications list, select an application.

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

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

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

  6. From File Type, select the type of file you are importing and click Next.

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

  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 - 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. 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:

      • 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 workspace. For example, if you are migrating an application to a production instance but still need to maintain development version.

    4. Click Install Application.

Installing Files from the Export Repository

Once you have imported files into the target Oracle HTML DB instance, you must install them before they can become active in Application Builder.

To install files stored in the Export Repository:

  1. Navigate to the Workspace home page.

  2. From the Applications list, select an application.

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

  4. From the Navigate menu on the right side of the page, select View Repository.

  5. 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.

    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 workspace. For example, if you are 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.

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 Builder 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 found under the Session Management section of the Application 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 runtime. 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. Select an application name from the Applications list.

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

  4. Under Logic, select Build Options.

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

  6. Follow the on-screen instructions.

    Once you create a build option, click the Edit icon to change it.

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

See Also:

"Editing Application Attributes" and "Editing Page Attributes" for more information on specifying build options

Viewing Build Option Reports

Oracle HTML DB includes a report detailing build option utilization in the current application.

To view a report of build option utilization:

  1. Navigate to the Workspace home page.

  2. Select an application name from the Applications list.

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

  4. Under Logic, select Build Options.

  5. On the Build Options page, click Utilization.

    This report displays build option utilization in the current application.