Designer/2000
Web Enabling Your Applications
VERSION 1.0: MARCH, 1996
March 1996
Author: Helen Barnes
Contributors: Mike Gwyer
Copyright © 1996 Oracle Corporation.
All rights reserved. Printed in the U.S.A.
This document is provided for informational
purposes only and the information herein is subject to
change without notice. Please report any errors herein to
Oracle Corporation. Oracle Corporation does not provide
any warrants covering and specifically disclaims any
liability in connection with this document.
Table of Contents
INTRODUCTION
Oracle
WebServer Overview
Designer/2000
WebServer Generator
Designer/2000
Repository
REVERSE
ENGINEERING AND GENERATION FOR THE WEB
1 Reverse
engineering database tables
2 Reverse
engineering your application
3 Generate
for the Web
THE
GENERATED WEB APPLICATION
CONCLUSION
Recommended Reading:
Oracle Designer/2000 WebServer
Generator Technical Overview,
Version 1, February 1996, Mike Gwyer
Introduction
The World Wide Web provides an environment for
distributing applications to
many users. By creating Hyper-Text Markup Language
(HTML) documents and publishing the Universal Resource
Locator (URL), documents are visible to anyone with an
industry standard Web Browser.
Maintenance of software on a large number of PC
clients has become an increasingly time-consuming task
for software librarians, DBAs and systems managers. Using
the World Wide Web, a Web page for an application can be
used by as many users as required, with the code stored
once on the server. Installation and maintenance issues
are no longer a major concern.
The only software required on the client is the Web
browser, such as Oracle Power Browser, or Netscape. The
Browser presents Web pages to the user, and the user has
control over a number of variables related to the
appearance of the data eg font size and colour,
background colour. Browsers are currently much cheaper
and easier to deploy than an equivalent client-server
application deployment tool.
Oracle products now allow us to supplement static HTML
with dynamic access to the database. By providing pages
built in real time from the database, Web applications
move from a static to a dynamic environment, greatly
increasing their value for the Web user.
This document describes the process of reverse
engineering, via Designer/2000, an existing application
deployed in Developer/2000. The application is then
generated for the Web, using the Designer/2000 WebServer
generator. The investment in producing the original
application is not lost, as the reverse engineering
process captures information about data accessed form the
database and stores it in the repository, ready for
generation into another deployment environment.
This also means that applications can be deployed over
heterogeneous environments with no rework, eg deployed in
Developer/2000, Visual Basic, Oracle Power Objects and
the Web.
Oracle WebServer Overview
The Oracle WebServer is integrated with the Oracle7
database. Business data stored on the Oracle7 database is
dynamically formatted into Web (HTML) documents within
the WebServer and then transmitted to Web Clients, on
demand from the user.
Figure : Oracle WebServer presents HTML pages and
dynamic data to Web Browsers
Web users request information by entering an
appropriate Uniform Resource Locator (URL). The URL
specifies the target Oracle WebServer machine or site,
the WebServer session (Oracle database logon information)
and the PL/SQL routine which will run.
Designer/2000 WebServer Generator
The Oracle Designer/2000 WebServer Generator provides
the benefits of modelling and team-working to sites who
want to deploy applications on the Web. The WebServer
Generator uses the same modelling techniques as the other
Designer/2000 generators (ie Developer/2000 and Visual
Basic). Thus it offers the ability to generate and deploy
Web applications from definitions already built and
deployed in Developer/2000 or Visual Basic.
Using Designer/2000 we can present not only static Web
pages, but interactive
query pages, where users can enter query parameters
and use these to query a
database. The query runs against a live, on-line
database, resulting in a response
which provides up-to-date data for the user.
Consequently, we can present the user with an
application which provides the
same data as a traditional client-server application,
through a convenient and
cheap interface, with a very low deployment and
maintenance overhead.
Figure : Oracle Designer/2000
Designer/2000 uses a repository to store design
information including data models, modules, module
structure, module logic and preferences (style guide).
From information in the repository, we can generate
database definition language, which can be run to create
tables, columns, constraints and other database objects.
We can also generate program definitions into Web pages,
as well as Developer/2000 and Visual Basic.
Designer/2000 also has a reverse engineering utility,
which will read definitions of Oracle7 objects including
tables, views, constraints, indexes etc in an existing
database and write them to the repository. Reverse
engineering of Developer/2000 Forms allows table and
column usages for those forms to be stored in the
repository.
Using this information we can generate the same
application (or a modified, re-engineered or new one)
against the same database schema, giving users a new
interface (eg the Web) to their data.
Reverse Engineering and
Generation for the Web
This section describes the process of reverse
engineering an Oracle application in Developer/2000
(Forms 4.5) into the Designer/2000 repository, and
generating the same application for the World Wide Web.
Figure : The process of reverse engineering and
generating, based around the repository
There are three main steps in the process:
1 Reverse engineering database tables
2 Reverse engineering your application
3 Generate for the Web
In the following example, we reverse engineer the
module funds, which shows details of funds, fund
sectors and fund holdings. The form is based on three
tables called FUNDS, FUND_SECTORS and FUND_HOLDINGS. The
`Reverse Engineer Database' utility recovers the data
schema including these tables and updates the
Designer/2000 repository. An application has already been
created using Developer/2000, and the module for funds
relates the units together as master-detail-detail. The
module definition is created in the repository by the
`Reverse Engineer Forms' utility.
Finally, the WebServer generator is run to generate a
Web application from the repository definition of the
FUNDS module, using the preferences for appearance of Web
applications also stored in the Repository.
Figure : Funds application deployed in
Developer/2000 Forms, with windows for funds, fund
sectors and fund-holdings
1 Reverse engineering database
tables
The `Reverse Engineer Database' utility puts the table
definitions into the repository, along with definitions
of any other Oracle7 database objects which exist, such
as views, constraints, indexes, sequences etc. The server
generator then creates the DDL for the objects, which you
can execute against any Oracle 7 (or ANSI) database.
Figure : Reverse Engineering the tables FUNDS,
FUNDS_SECTORS and FUND_HOLDINGS
2 Reverse engineering your application
Designer/2000 will reverse engineer your
Developer/2000 application into the
repository. The `Reverse Engineer Form' utility will
create a module definition and store table and column
usages for that module in the repository.
Figure : Reverse engineering the Developer/2000
forms application for FUNDS (funds.fmb)
The utility produces a report to show which tables and
column it has found
used in the program.
Using the Module Data Diagrammer, one of the
Designer/2000 toolset, we can visually represent the
module definition which we now have in the repository.
The diagram appears as below, with the table usages
showing a master-detail-detail relationship.
At this stage it is necessary to add display prompts
to the table and column definitions or to the module's
detailed column usages, as they are not stored in the
repository by the reverse engineer forms utility.
Figure : The Module Data Diagrammer visually
represents the module definition of the FUNDS module
Reverse engineering a Developer/2000 report will also
result in a module definition in the repository, which
can be examined and modified if necessary, then generated
into a Web-enabled application.
If you do not have Developer/2000 applications, (Forms
or Reports), then a module can be created in the
repository, and a module data diagram created by dragging
and dropping table definitions onto the drawing surface.
The generation process from here is as described below.
3 Generate for the Web
The Designer/2000 web generator generates a web page
(or set of pages ) for a
module. During generation the Oracle WebServer
Generator creates a set of PL/SQL packages, which are
then installed into an Oracle WebServer database.
Figure : Oracle WebServer
generator produces PL/SQL packages which are used to
create dynamic Web pages
Oracle PowerBrowser, or any other HTML Browser may be
used to run generated applications. Preferences control
the appearance of the generated output - for example;
justification of number fields, layout of record lists
and query pages.
The Generated Web Application
Below is the set of Web pages generated from the Funds
module after it was reverse engineered into the
repository. The startup page has a query dialogue, in
order to refine the data retrieved from the database. If
the fields are left blank, all of the rows are retrieved.
Subsequent links to detail records are automatically
generated, so navigating through the master-detail-detail
structure of the module is presented in exactly the same
fashion as static Web pages, using HTTP links.
Textual information on the page is generated from
module help text stored in the repository. The query
fields are based on those fields marked `queryable' in
the repository.
Figure : Startup page for FUNDS Web application
showing query fields and text derived from module help
Figure : List of Funds dynamically created
Figure : Generated Web page showing Fund Details
and http links - Fund Sectors is a link to another
generated page in this module
Figure : Generated Web page showing Fund Sectors
and http links to further information on generated pages
.
Figure : Fund Sector record details and link to
Fund Holdings
Figure : Fund holdings record list
Figure : Fund Holdings record detail - the final
generated page of the funds module
Figure : This static HTML page is linked from the
URL in Figure 10
Designer/2000's WebServer generator produces Web
applications very quickly and simply from module
definitions in the repository. These module definitions
may be created against table definitions, or reverse
engineered from existing applications.
Reverse Engineering existing applications populates
the repository with module definitions from which we can
directly generate web applications, obviating the need to
create new module definitions. Consequently, the
deployment of existing applications to the Web becomes a
simple and quick process using the powerful Designer/2000
WebServer Generator.
|