Understanding the Key Differences with Oracle Application Express

Understanding the key differences between Oracle Application Express and Oracle Forms will greatly assist you in redeveloping your applications.

About Stateless Web Applications

Oracle Application Express does not maintain a constant state between the client (that is, the web browser) and the database, but performs stateless transactions. A database session is only utilized when requesting or submitting a page. Because Oracle Application Express is stateless between the start and the end of a logical transaction, (for example, when updating a record,) it is imperative to use optimistic locking rather than pessimistic locking.

Oracle Forms use pessimistic locking whereby the record is locked when a user requests a record for update. This lock is maintained until the record is completed (or committed) or canceled (or rolled back). One of the key reasons for not using pessimistic locking within a stateless web application is that if a user closes their web browser or loses their connection in the middle of a transaction, the record remains locked.

Using the Create Application or Create Page wizards to generate form pages also creates Automatic Row Fetch and Automatic Row Processing processes which incorporate the MD5 checksum validation to enforce the optimistic locking.

Using the Create Application or Create Page wizards to generate form pages also creates Automatic Row Fetch and Automatic Row Processing processes which incorporate the MD5 checksum validation to enforce the optimistic locking. Before the record is sent to the database to be updated or deleted, the MD5 initially created is compared to the MD5 value of the current database record to ensure they are the same. If they differ, then the database record has been updated since it was queried and an error displays to the user.

One consequence of an HTML application is that a rendered page does not perform actions such as validations or hiding and showing fields as the user interacts with the page. Validations are performed when the user submits the page for processing. However, you can change this default behavior by utilizing JavaScript and Ajax. The time needed to load a page is influenced by the transmission speed and the speed with which the web browser renders the page. Therefore, it is not advisable to attempt to completely replicate the client-side interactivity within an HTML application as the weight (or size) of the page adversely affects page performance. As a best practice, only implement critical client-side actions.

About Evaluating User Interface Design

Oracle Forms use different underlying technologies to present screens to users. In contrast, Application Express renders HTML through a web browser. As a consequence, the design of screens and items is very different.

When reviewing screen design, some screen layouts commonly used in Oracle Forms, such as query / update regions, are not readily reproducible in Oracle Application Express. Other screen design concepts can readily be reproduced, such as using interactive grids to display master-detail-detail information.

Oracle strongly recommends that developers do not try and reproduce the exact look and feel nor the exact functionality as used in the Oracle Forms application. For example, Application Express does not support the notion of Enter Query and Execute Query modes, and developers should not try to implement such functionality within Application Express, as this is not standard Web page functionality. Instead developers should use the Create Application wizard and Create Page wizard to create modern, intuitive Web 2.0 applications.

The Universal Theme within Application Express is a fully responsive theme, which adjusts based on the screen size. For tablets and smartphones the size of the screen is significantly smaller than for desktops, so the page will be rendered responsively by changing the size and positioning of regions and even moving labels above items instead of to the left. As such, Application Express does not support coordinate positioning, or pixel perfect layout, of regions or items on a page as there is with Oracle Forms. Application Express uses a grid layout to set out elements and attributes (such as New Line, New Field, Column Span, and Row Span) to determine how elements are located.

About Business Logic Replication

One of the major aspects of converting from Oracle Forms is replicating the business user interface specific logic. It is important to separate business logic from logic for manipulating the user interface. Given the differences in user interface implementation, the majority of the associated logic from the original application will no longer be relevant. Oracle Application Express uses processes, computations, and validations to implement business logic. Some logic can also be replicated by utilizing default and source values within the Oracle Application Express item definition.

The key to ensuring your new application performs correctly is to understand how and when each of these functions operate. The ability to add conditional logic to any component within Oracle Application Express (including regions, items, branches, processes, computations and validations) also provides extensive flexibility when replicating the original business logic.