Almost every developer who worked with Oracle Forms, encountered the forms compare problem.
If the team uses the four eyes principle, then the problem is even more present.
Oracle PL/SQL code can be compared with the numerous compare tools that exist in the market, but what happens with the Forms?
There are some tools in the market, for example, FormsTool – ORCL Toolbox, these are not free.
The needed tools in order to develop a simple oracle compare tool exist. Almost every developing team uses a versioning tool for their code and forms.
A variety of tools exist that compare text files, some of them are freeware. I personally prefer WinMerge which is an Open-Source file compare tool.
The problem with the forms is that they are not text files but binary files that cannot be compared with a text file compare tool. Oracle has a solution for that problem.
In an Oracle installation, you can find a shell script (frmf2xml.sh) that converts an Oracle form to XML. The purpose is to convert an Oracle Form to an APEX Form.
The idea was to create a tool that combines all this existing tool in order to be able to compare Oracle forms.
The preferred programming language used is Python, mostly because it is simple.
Another problem faced, was that the form must access the server in order to read the libraries. In consequence, the oracle form cannot be opened without first connecting to a database server. That was also a problem for the frmf2xml.sh shell script that cannot be used locally. For that the python script had to send the form to the server, convert it and bring the converted XML back.
The Forms Tool application was developed in order to compare oracle forms.
It is a light weigt application that can compare forms. The comparison results are stored in a XML file and are shown in WinMerge. That can be changed and another comparing tool can be used with a change in the configuration. The new comparison tool can only be used if it has command line cabability.
Things like user, connection, editor, merge tool and the end format of the XML file are configurable.
The main steps of the conversion process are the following: chekout the forms, send the forms to the application server, convert the forms, get the converted XMLs back, convert the XMLs in a format that is readable (remove XML special characters, add returns in PL/SQL code), opens the 2 XMLs with Winmerge.
1. Compare two versions.
2. Compare a version against a local copy
3. Compared two local copies.
An example of a comparison result would look something like this. There 2 output options (TREE or XML).
The application has 3 configuration files.
1. The main Configuration File holds all important information, for example (users, servers, external tools to use, etc).
2. The Replaces configuration file. Used to convert the final XML to a format that, that is readable in the WinMerge Comparison
3. The remote is handy when more than one users want to share the other two configuration files.