You are on page 1of 3

APEX 3.

2: The Oracle Forms to


APEX conversion
by Roel Hartman, Logica

V ersion 3.2 of Oracle Application Express (APEX) is the most recent And you can easily monitor the progress of
the (manual) conversion to the APEX
version of this successful Web-based Rapid Application Development
equivalent.
tool. A key new feature is the ability to convert Oracle Forms (and
Reports) to APEX pages. The conversion uses the same wizards as
the manual build of an APEX application.
Therefore the result of a conversion project
Why convert to APEX? from the PL/SQL in triggers and program is similar to manually built APEX
units, APEX converts Forms components application and is just as easy to maintain.
Just to be clear I emphasise that, at this automatically to APEX components.
moment, Oracle has announced no plans The differences between the two tools such How does the Forms to APEX
to de-support Oracle Forms. Indeed this as the difference between PL/SQL and conversion work?
year Oracle will release the long-awaited JavaScript, means it is almost always
version 11 of Forms. Therefore the necessary to manually add or change code. First, you need to convert the Oracle
threat of the end of support is no reason to Obviously business rules which are imple- Forms – and their menus, templates and
say goodbye to Forms. But libraries – to XML. This can be
Forms is based on done using the Forms to XML
a somewhat outdated client- Utility: frmf2xml.bat, a DOS
server technology from the batch file, which is a standard
middle of the eighties. In addi- “...the result of a conversion project part of an Oracle Developer
tion, Oracle Forms uses a Java Suite installation.
applet instead of HTML and
is similar to manually built APEX
so is not consistent with the application and is just as easy In APEX you have to create a
modern approach to Web new workspace, and link the
applications. Furthermore, to maintain.” database schema of the
because Forms uses a Java application to it. After logging
applet, it is not suitable for into the new workspace in
deploying an application (or APEX, there is a link on the
part of one), for example, for on-line mented in the database means less PL/SQL main page: Application Migrations.
shopping or order tracking to users outside in place in the Forms and that simplifies a Previously, this link was only used when
a company’s network. APEX on the other conversion project considerably. This converting MS-Access applications, but
hand uses HTML and JavaScript, and so applies not only to a conversion to APEX, now the conversion of Forms is added to
can run in a browser without the need for a but also to a conversion to other web tools, that menu.
large (initial) download and imposes a such as ADF.
smaller burden on the client. After clicking on that link you create a new
In order to assess the impact of a Migration Project and the first XML file can
Conversion to APEX offers the conversion project, you can use APEX to be uploaded to the project. Subsequently,
modernisation of an application with identify the PL/SQL code in the Forms. you upload all the other XML files to the
innovative features such as Flash Charts
and Interactive Reports. An additional
Figure 1: Flow Chart Forms to APEX conversion
advantage is that the knowledge and skills
to develop APEX are already available in a
Forms development shop: like Forms it has
a declarative way of development and is
SQL and PL/SQL-oriented.

And – as an additional advantage – APEX


is free (or, as Oracle likes to call it, it is a
no-cost database feature). And that allows
you to save around $ 5000 per year on
maintenance fee for the Forms and Reports
Server, and about $ 1200 per year per
developer on the licenses for the Internet
Developer Suite.

What does the Forms to APEX


conversion offer you?
The Forms conversion provides a rapid
launch of a modernisation project. Apart
1
Conversion is supported from Forms version 9i upwards.

24 A UK Oracle User Group publication


Figure 2: Conversion result

TECHNICAL
project. Unfortunately, at this moment it is Now you can generate the APEX In addition to the CRUD functionality,
not possible to upload a zip containing application. The generator transforms a APEX converts LOV’s and creates
multiple XML files or the contents of an Forms block to one or more APEX pages. validations for numeric, date and
entire directory in a single upload. It uses several criteria such as the number mandatory fields.
of blocks in the form and the presence of
The XML files are loaded into a number of relationships between the blocks, the num- In the current version it is only possible to
internal APEX tables and analysed. APEX ber of records that’s displayed and if insert convert a whole Migration Project –
presents the result of that analysis using the or update is allowed, to determine whether a collection of Forms – to an APEX
standard features of the Interactive an APEX Report, a Report and a Form or Application. This means that you need to
Reports. Within APEX you have insight in a Master Detail-page is created. This convert all Forms of an application at once
the definition of each Forms component, process uses the same Create Application (although you can come up with a
such as a block, item, trigger, record or Wizard from the previous version. At this workaround involving copying pages).
LOV group. To support the conversion point in the conversion process, you can In terms of project management, especially
you can make an annotation for each add or remove pages (which you can also when dealing with a large number of
component, containing a comment or a do after the final generation). Making some Forms, that is not the preferred method.
particular point of interest. The ability to small adjustments in the layout you’ll have It would be preferable to convert Forms in
tailor the conversion process is currently an APEX application that shows a high chunks to an APEX Application. This
limited to: marking a component as “not degree of similarity with the original Forms feature is on my wish list for APEX 4.0.
applicable”, changing the query of a block application (see Figure 2 for a converted
and customising prompts. master-detail screen).

“In addition to the CRUD functionality, APEX


converts LOV’s and creates validations for
numeric, date and mandatory fields.”

OracleScene Issue 38 Summer 2009 25


Figure 3: Project Progress tracking
APEX 3.2: THE ORACLE FORMS TO APEX CONVERSION

The next – and perhaps more time- The approach to a conversion Conclusion
consuming step, is to evaluate and rebuild project
the Forms functionality that has not been The ability to automatically convert Forms
automatically converted. You can use the APEX doesn’t automatically converts and Reports to APEX (albeit with some
Interactive Reports to monitor the progress the PL/SQL in Forms, so obviously a manual intervention), makes it even more
of your conversion project and assess what conversion is easier if the amount of attractive for organisations with a big
work is still required. These reports can be PL/SQL involved is as minimal as possible. investment in traditional Oracle tools.
customised in the usual way. You can As part of the preparation for a conversion, Using APEX opens up the possibility of
drill-down on each trigger or PL / SQL I therefore recommend to move the (most saving costs on the maintenance fee of the
procedure and mark whether you need to critical) business rules from the Forms into Oracle licenses and unlike a Forms applica-
convert it. The higher level shows the the database and / or implement them as tion, an APEX application is well suited to
number of components you need to review web services. This is in accordance with the sharing information with customers, such
or modify. There is a percentage that very Oracle Forms Oracle Modernisation as order entry and tracking applications.
roughly indicates the progress of the Strategy. Subsequently, choose a number of Nevertheless, having read this article you
project (see Figure 3). Using the default representative Forms to prototype into will appreciate that this kind of conversion
options for adding calculations in a report APEX. In this phase you adapt the APEX is not a matter of simply pressing a button.
you can create more accurate figures of the themes, templates and stylesheets to the You need to set up a complete project.
remaining work. It goes without saying needs of your users. Also start building A number of activities need manual effort.
that after a complete conversion a full your own generic JavaScript libraries. The scale of manual effort is largely
regression test of the application is crucial. Now is the time to choose whether external dependent on the amount of business rules
JavaScript libraries, like jQuery, you will (PL/SQL) in the Forms and the complexity
Conversion or reconstruction? use. Plus you should set the standards for of the application. Fortunately APEX 3.2
monitoring the progress, for example, by provides a good set of functionality for
My experience is that, using the wizards in customising the default reports. And finally, managing the project and ensuring that all
APEX, an application can be built at warp this is the ideal time to collect figures to components are converted.
speed. The conversion process essentially feed into estimates for the planning of the
just uses those same wizards for generating entire project. If this is all according to Release of version 3.2 makes the step of
the pages. The conversion only permits plan, you can start executing the actual converting Forms to APEX is a lot smaller.
adjusting pages at the end (whereas, the conversion.
manual variant allows it during the design
of the page). So why should you use this
new conversion functionality?
Primarily you should use it because all the
components of the Forms are visible in
APEX, and so you can check the progress “The ability to automatically convert Forms
of each individual component. Therefore
the advantage is mainly in the project man- and Reports to APEX ... makes it even
agement area, assuring the completeness
and quality of the conversion exercise. more attractive for organisations with a big
investment in traditional Oracle tools.”

About the Author


Roel Hartman is Software Architect at
Logica (roel.hartman@logica.com) and
has been involved in the beta testing of
APEX 3.2. He keeps an APEX-related
blog on http://roelhartman.blogspot.com
Special thanks to my colleague Andrew
Clarke who helped me out in writing
this article.

26 From the UK Oracle User Group

You might also like