+ All Categories
Home > Documents > development of an analysis and reporting tool for oracle forms source codes

development of an analysis and reporting tool for oracle forms source codes

Date post: 12-Sep-2021
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
27
DEVELOPMENT OF AN ANALYSIS AND REPORTING TOOL FOR ORACLE FORMS SOURCE CODES by Çağatay YILDIRIM June, 2008 İZMİR
Transcript
Page 1: development of an analysis and reporting tool for oracle forms source codes

DEVELOPMENT OF AN ANALYSIS AND REPORTING TOOL FOR ORACLE FORMS SOURCE CODES

by

Çağatay YILDIRIM

June, 2008

İZMİR

Page 2: development of an analysis and reporting tool for oracle forms source codes

CONTENTS

Page

PROJECT EXAMINATION RESULT FORM ........................................................... ii

ACKNOWLEDGEMENTS ........................................................................................iii

ABSTRACT................................................................................................................ iv

ÖZ................................................................................................................................. v

CHAPTER ONE - INTRODUCTION .................................................................... 4

CHAPTER TWO - RELATED INFORMATION .................................................. 4

2.1. What is Oracle Forms ........................................................................................ 4

2.2. Oracle Forms Architecture ................................................................................ 5

2.3. Oracle Forms Object Hierarchy......................................................................... 5

2.4. Development Environment Features ................................................................. 8

CHAPTER THREE - PROBLEM.......................................................................... 10

3.1. Development Problems.................................................................................... 10

3.2. Lacks of Development Environment ............................................................... 10

CHAPTER FOUR - SOLUTION............................................................................ 10

4.1. Requirement Analysis for Solution ................................................................. 10

4.2. Design of Solution ........................................................................................... 11

4.3. Solution Methods............................................................................................. 14

4.3.1. Search Method .......................................................................................... 14

4.3.2. Compare Method ...................................................................................... 17

4.3.3. Explore Method ........................................................................................ 18

4.3.4. Statistics Method....................................................................................... 20

4.3.5. List Method............................................................................................... 21

4.3.6. Convert Method ........................................................................................ 22

Page 3: development of an analysis and reporting tool for oracle forms source codes

4.4. Solution Features ............................................................................................. 24

4.4.1. Windows and Web Platform..................................................................... 24

4.4.2. Multi Language User Interface ................................................................. 24

4.4.3. Theme Support for Web Platform............................................................. 25

CHAPTER FIVE - FUTURE WORK.................................................................... 25

CHAPTER SIX - CONCLUSION .......................................................................... 26

REFERENCES........................................................................................................... 31

Page 4: development of an analysis and reporting tool for oracle forms source codes

1. Introduction

Oracle Forms is a rapid application development tool that is suitable for developing database

application. This development environment has some difficulties for observing and analyzing

application source codes because of binary source code files. Also this development

environment has limited search feature. In response to these problems a solution is developed

for analyzing, searching, comparing, exploring text base source codes.

2. Preview/Advance Information/Related Information

For understanding the application advance information should be known. Oracle Forms

development environment, its architecture, and its features is explained in this part.

2.1. What is Oracle Forms

Oracle Forms is one of the Oracle Developer Components. Oracle Forms is a interaction

application development environment that can present information through textual items, GUI

objects, and bitmapped images. Users can perform database transactions by interacting with

these objects.

Oracle Developer Components have an internet based computing architecture. There

are three tiers: Database Server, Application Server, and User Client. User accesses the

application through internet. Applications that are built with Oracle Forms are stored in

Oracle Application Server and serves to the users. Oracle Forms Applications interact with

the Oracle Database Server and makes database transactions.

Graphic 2.1 – Oracle Developer Components interaction

Page 5: development of an analysis and reporting tool for oracle forms source codes

2.2. Oracle Forms Architecture

Oracle Forms has developer, compiler and runtime applications. These are: Form Builder,

Form Compiler, and Forms Runtime.

Oracle Form Builder application is designed for developing form base database

application that includes GUI object for making an user-friendly interaction. This form

applications are stored on disk as a binary source code.

Oracle Form Compiler is a command based application that converts source codes to

run able applications. That application is both exits in Oracle Developer Suite and Oracle

Application Server. Form Builder is uses this application before debugging for compiling

source code.

Oracle Forms Runtime is a java applet that runs over web browsers. Forms Runtime

calls the forms application from application server and runs it on user client. Application on

the user client interacts with the application server for every database transaction.

Graphic 2.2 – Oracle Forms Architecture

2.3. Oracle Forms Object Hierarchy

Page 6: development of an analysis and reporting tool for oracle forms source codes

There are three main modules that are developed on oracle forms builder: Form, Menu, and

Library. Form includes data objects and graphics. There is a common template for developing

forms applications. Menu is a generic menu object that is used in form applications and that

can be attach to any GUI object. Library can be used for storing commonly used pl/sql codes

or objects that can be inherit by form objects.

Graphic 2.3- Oracle Form Modules

Form Modules can use several Data Sources, Database, Oracle Developer Components

and ActiveX/DDE/OLE2 libraries. Data sources and Database can be Oracle Database or any

ODBC based database for example: MsAccess, MySQL, SQLServer, DB2, Firebird etc. Also

developers can embed ActiveX/DDE/OLE2 library objects into form modules.

Page 7: development of an analysis and reporting tool for oracle forms source codes

Graphic 2.4 – Oracle Form Object Hierarchy

Oracle Forms form module’s main object is Module. Module object includes Block,

Window, and Canvas data and view objects. In addition Form module includes Alert,

Attached Library, Menu, LOV, Program Unit, Object Library, Record Group, and Visual

Attribute objects. Module object has trigger and program units properties.

Block object includes item and relation data objects. Block object has Trigger

properties. Item objects have also Trigger properties. Item objects can match with database

table columns and become database items.

Window object is an object that shows Canvas objects. Canvas objects are the floor

object for GUI objects. All GUI objects that are shown should be an Canvas object.

Form Modules are stored as binary source code files with the file extension “fmb”.

Menu Modules are stored as binary source code files with the file extension “mmb”. Library

Modules are stored as binary source code files with the extension “olb”. The compiled Form

Modules are binary files with the extension “fmx”. The compiled Menu Modules are binary

files with the extension “mmx”. Library Modules are not compile-able files.

Page 8: development of an analysis and reporting tool for oracle forms source codes

2.4. Development Environment Features

Oracle Forms development environment has several builder components that are also in

Oracle Report Builder, Discoverer Builder, and Graphic Builder. Main builder components

are Object Navigator, Layout Manager, Property Palette, and PL/SQL Editor.

Object Navigator list the objects in form with an order of forms architecture. Multiple forms,

menu files of library can be listed on object navigator. Also Database objects are listed on

object navigator.

Layout Manager is the main GUI developer. All graphical objects’ layout can be

edited with layout manager. Developers can design the style, color, size, and arrangement of

visual objects in the application. The layout can include graphical objects and bitmapped

images when running in a GUI environment.

Graphic 2.4 – Oracle Builder Components

Page 9: development of an analysis and reporting tool for oracle forms source codes

Property palette show all properties and values of selected object. Developers can edit

properties of object with it. Also developers can copy and paste properties of object between

same type objects.

PL/SQL Editor component enables writing pl/sql codes for objects’ triggers. This

editor also compiles pl/sql code and helps developer for fixing problems on pl/sql source

codes.

Page 10: development of an analysis and reporting tool for oracle forms source codes

3. Problem

The reason for developing an application for analysis and report forms source codes is

problems that developers faced some problems while developing forms applications. These

can be development problems or lacks of development environment.

3.1. Development Problems

Oracle Forms Developers’ are developing form application, designing forms and writing

pl/sql codes but the source code is binary and inaccessible from another application. Most of

development environment stores source codes as text files. So that Reporting or analyzing

source codes is impossible. This problem causes writing reports for applications manually or

analyzing source codes or comparing source codes manually over the Oracle Forms Builder.

3.2. Lacks of Development Environment

Oracle Forms Builder has a limited search feature. Search operation only can be done on

trigger pl/sql codes. This limited search is not covering needs.

4. Solution

Solution is an application for analyzing and reporting oracle forms source codes and covering

lacks of development environment. The solution is limited and shaped with making a

requirement analysis with oracle forms developers. Then the design of the solution is made.

Finally the application is coded according to design. During coding phase some of the

additions are done and design is renewed.

4.1. Requirement Analysis for Solution

The requirement analysis before designing application is done that includes both

questionnaire and oral examination. Firstly requirement analysis is done with making

questionnaires with Oracle Forms developers. The questionnaire includes several questions.

These questions are about problems that they come face-to-face while developing forms,

reporting forms source codes, and analyzing source codes. At the end of requirement analysis

the scope of the application is determined.

Page 11: development of an analysis and reporting tool for oracle forms source codes

4.2. Design of Solution

Design of solution is done according to information taken from requirement analysis. The

application is designed for running both on Windows OS and Web Based. The components of

the two different platform applications are changing.

Graphic 4.1 – Solution components on different platforms

Web based application includes List, Search, Explore, and Statistics components.

Windows based application includes Convert, Compare, Search, and Explore components.

Some of the components are common some of them not that is necessity. List

component on the web application lists application according to developer’s authenticated

projects. Statistical component shows information about source code statistics that are

dynamically changing according to user project authentication.

Page 12: development of an analysis and reporting tool for oracle forms source codes

Convert component is only in windows based application because it makes source

code convert operation through windows command line applications. Compare component

compares two source codes and generates difference of two source codes as a result. Also

compare operation needs reading two source code files selected by application that can be

done in windows based application.

Explore component shows the source codes as an object tree and objects properties, its

data blocks, and canvas views. Search component makes search over every object and their

properties. The search result is given as an object tree.

Graphics 4.2 – Web and Windows application common and uncommon components

Design of applications can be examined in three layers: Data Layer, Business Layer,

and UI Layer. In data layer for making user authentication and listing project we use existing

Oracle Database. Only read operations can be done to this database. For making source code

analysis source codes should be as primarily. Primary source codes are FMB source code.

Application can convert FMB source codes to XML source codes. Analysis and reporting

operations are being done over XML source codes.

Business layer includes all working components. These components are divided in two

groups according to platforms that is told before. Also there is another helper component User

Authentication component for making authentication.

UI layer includes graphic user interface elements. There are four windows platform

interface and five web based interface. Windows platform interfaces are Convert, Compare,

Page 13: development of an analysis and reporting tool for oracle forms source codes

Search and Explore interfaces. Web based interfaces are Login Page, Application List Page,

Form Data Structure Explore Page, Form Graphics Explore Page, Search Page, and Statistics

Page. Detailed information about these interfaces is given in Solution Methods section.

Graphic 4.3 – Layers of applications

Windows application is coded with C# programming language in Visual Studio 2008 IDE.

Web application is coded with php in Zend Php IDE. Web page authentication is done

through Oracle Database 9i. XML parsing and operating with C# solved with Linq-to-Xml.

Page 14: development of an analysis and reporting tool for oracle forms source codes

4.3. Solution Methods

Main methods of applications are Search, Compare, Explore, Statistics, List, and Convert.

These methods are explained with details in this section.

4.3.1. Search Method

Search Method is can be examined in two platforms: Search method on windows and search

method in web. Both these methods have simple and advance search options.

Windows application’s search method has a simply interface. User adds form files

with xml extension using “Files” tab below search keyword entrance. After adding xml form

files user enters key word to textbox near the magnifier icon then clicks magnifier icon. As

the result of search operation a object tree is generated on the middle on the interface. The

object tree shows where the keyword is found. If user clicks on the object name on the tree,

object’s properties are listed on the right column of the interface. User can easily find a value

or key in this way.

Graphic 4.4 – Simple search in windows application

Page 15: development of an analysis and reporting tool for oracle forms source codes

In advance search on windows application there is only one difference from the simple

search. Near the “Files” tab there is “Advanced Settings” tab. In Advanced Settings tab user

can select in which objects the search operation is being done. With this feature user can limit

the search scope on the form files.

Graphic 4.5 – Advanced search in windows application

Web based search method is so similar to windows search method but the difference is

web users can only search over the authenticated oracle form files. This authentication is

based on which projects the developer is working. Also web based search generates an output

as a result like a list. First of all the list includes in which files the key word is found. Then the

details of the result are listed.

Advanced search in web application is done by selecting related objects through the

object tree and selecting projects from project list. By the way the search operation is only

done on a limited scope both in projects and forms objects. Simple search method search

through all objects and all authenticated projects so that the time spent in simple search is

longer than advanced search.

Page 16: development of an analysis and reporting tool for oracle forms source codes

Graphic 4.6 – Search method in web application

Graphic 4.7 – Search result in web application

Page 17: development of an analysis and reporting tool for oracle forms source codes

4.3.2. Compare Method

Compare method only exist in windows application because compare operation is more

complex for a web application. Compare method compares two selected form xml source

codes and finds the differences between these files. Differences between each other listed as

result and the results can be saved as oracle xml source codes.

The reason for making compare method is finding the differences between versions of

an form application. If developer wants to find the difference between two versions of a form

application, developer can easily find the difference between versions with this method.

Graphic 4.8 – Compare method interface in windows application

Compare algorithm is recursively takes an object on the right side and tries to find that

object in left side. If object is not found on the left side the object is listed on the right side. As

correspondence compare algorithm recursively takes an object on the left side and tries to find

that object in the right side. If object is not found on the right side the object is listed on the

left side.

Page 18: development of an analysis and reporting tool for oracle forms source codes

4.3.3. Explore Method

Simply explore method enables users to explore the source code easily with object tree and

graphical description (Only in web application). Explore method exists in both windows and

web application.

Explore method in windows application shows forms objects in tree style. When user

selects an object through the tree, object properties will be listed on the right side on property

grid. This method enables viewing source code easily like in the Oracle Form Builder. For

text based examinations or observations can easily be done.

Graphic 4.9 – Explore method interface in windows application

On web application explore method is more complex then windows application

explore method because graphical interface of the form can be generated on web application.

Simple data object tree is generated with xsl file. This xsl file is styles the oracle form xml

source code file. This xsl file is taken from http://www.geocities.com/oranails/.

Page 19: development of an analysis and reporting tool for oracle forms source codes

Graphic 4.10 – Explore method data explore interface in web application

On web application graphical explore of oracle forms source code is done by creating

SVG’s of every canvas object in form. SVG is language for describing two dimensional

objects in xml standards. Most of the web browsers render svg files and shows the graphic.

By the way the generated graphics of every canvas shows user interface of forms to the

developer.

Graphic 4.11 – Explore method graphical explore interface in web application

Page 20: development of an analysis and reporting tool for oracle forms source codes

Graphic 4.12 – Developer primary needs with forms source codes

4.3.4. Statistics Method

Statistic method only exists in web application because this method should be read all

available forms source codes that are categorized according to projects. Statistical information

about projects and project form source codes is listed in statistics method. This statistics are

being dynamically created. In runtime statistical information can be generated. This method

can be organized according to DBA or developer needs.

Graphic 4.13 – Statistics method interface in web application

Page 21: development of an analysis and reporting tool for oracle forms source codes

Graphic 4.14 – Developer and DBA needs statistical information about projects

4.3.5. List Method

List method lists authenticated projects to the developer. Through the authenticated project

developer can list form names of the project and then developer can access to the data and

graphical definition of the form.

Graphic 4.15 – List method in web application

Page 22: development of an analysis and reporting tool for oracle forms source codes

Graphic 4.16 – List method’s form list in web application

The list method is a general router from the project to the source code. This method

can be defined as a dynamically generated online report for the developers. Also this method

can be used as a reference for the applications or source code repository of the projects.

Graphic 4.17 – Developers list authorized applications.

4.3.6. Convert Method

Convert method is one of the core methods that enables users to convert form source code

files with fmb extension to oracle form source code files with xml extension. The conversion

only can be done where the application developer suite is installed because this method needs

frmf2xml command line convert of Oracle Developer Suite. That command line application is

Page 23: development of an analysis and reporting tool for oracle forms source codes

released in 10g version of Oracle Developer Suite. Conversion also can be in reverse

direction.

Graphic 4.18 – Convert method in windows application

Custom converter selection is needed if the system variable’s path doesn’t include

Oracle Developer Suite’s bin directory or the version of developer suite is different. This

option can be selected through “File” menu on “Settings” item.

Graphic 4.19 – Convert method settings in windows application

For up-to-date web based reporting in web application administrator of the web

application should be convert fmb source code files frequently. By the way web application

can be as the expected state.

Graphic 4.20 – Admin of the web application frequently converts fmb files to xml files

Page 24: development of an analysis and reporting tool for oracle forms source codes

4.4. Solution Features

Solution has several technical and non technical features. These are: windows and web

platform, multi language user interface, and theme support for web application.

4.4.1. Windows and Web Platform

Application has developed to work in different platform according to user requirements and

technical states. Convert component is only in windows based application because it makes

source code convert operation through windows command line applications. In compare

method, compare operation needs reading two source code files selected by application that

can be done in windows based application.

List component on the web application lists application according to developer’s

authenticated projects. Statistical component shows information about source code statistics

that are dynamically changing according to user project authentication.

4.4.2. Multi Language User Interface

Multi language user interface feature exists in both windows and web applications. Windows

application multi language user interface feature is developed with .Net Globalization and

.Net multi language resource libraries. In windows application user selects language on “File”

menu “Settings” item “Language” section. Primarily English and Turkish language support

exists in windows application. Web application multi language user interface is formed

storing all texts in language files. In web application user selects interface language on

“Settings” page. In web application primarily English and Turkish language support exists

too.

Graphic 4.21 – Multi Language user-interface support.

Page 25: development of an analysis and reporting tool for oracle forms source codes

4.4.3. Theme Support for Web Platform

This feature is a web based user customization feature because with this feature every user

can use application with selected theme and this option is saved as user option. Also these

styles can be edited by web designers. Styles are stored in “\style” directory. When a new

style is added to style folder automatically it will listed in settings page. Language and style

selection on web application is stored on “db\config_xxx.xml” files.

Graphic 4.21 – Theme support for web platform

5. Future Work

Developer requirements could be changed when new problems are occurred. Nevertheless

additions to these applications can be done or improvements could be done according to

changing user requirements. Also this application will be a base application for developing a

custom Oracle Forms development environment.

Page 26: development of an analysis and reporting tool for oracle forms source codes

6. Conclusion

Solution is an application for analyzing and reporting oracle forms source codes and covering

lacks of development environment. The solution is limited and shaped with making a

requirement analysis with oracle forms developers. This project makes detailed search, source

code exploration (graphical and data sturcture), source code convertion (binary to text – text

to binary), source code comparision, application listing, and gathering source code statistics.

Both web and window applications have multi – language user interface. Also web

application has theme feature.

Page 27: development of an analysis and reporting tool for oracle forms source codes

7. References

Oracle Forms 10g (10.1.2) Documentation

http://www.oracle.com/technology/documentation/10g_forms.html

Oracle Forms Developer and Forms Server Documentation

http://www.oracle.com/technology/documentation/forms.html

Php Documentation

http://www.php.net/docs.php

Michael Champion, .NET Language-Integrated Query for XML Data, February 2007

http://msdn.microsoft.com/en-us/library/bb308960.aspx

Language-Integrated Query (LINQ) LINQ to XML Overview

http://msdn.microsoft.com/en-us/library/bb387061.aspx

Oracle Forms XSL http://www.geocities.com/oranails/


Recommended