Vous êtes sur la page 1sur 120

Anual conference 2003 - Vienna

Oracle Forms 9i
Dream & Reality
Peter Anzenberger
peter@peter-partner.com

Applications Evolving With Forms

Block Block Mode Mode

Character Character Mode Mode

Client Client Server Server

Web Web

? ?

? ?

History of Forms

2004 6i

Oracle Forms 10g

Oracle Forms 10g ???

The Problem and the Reality

! ! !

Many data entry applications dont need desktop integration But many do. Can be a significant barrier to Web deployment There are ways

The Problem and the Reality


!

Should I Migrate to the Web Today?


Migrate? Yes Yes Maybe Probably Not Probably Not Maybe

Integration Occasional Upload Background Calculations Mail Merge Document Storage in the DB Full on Outlook & Word Integration Integration with Testing Equipment

The Problem and the Reality


DB Server Application Server

Desktop

Database Document Storage

Generic Applet PJC JavaBeans

Form Runs Here Host OLE Read_Image_File ORA_FFI

The End of Client/Server?

A successful Migration
!

Customer: voestalpine stahl Linz GmbH What to do:


! C/S ! Web . . Forms 6i or Forms 9i

How much forms: approximately 150

History of the Project


!

At the beginning was Forms 3.0


! Terminals on SCO Unix Servers

Migration with Designer 2.1 to Forms 5.0


! ! ! ! Creation of an OLB for Designer Creation of Templates Reverse Engineering and Generation with Designer 2.1 Layout made new with FormBuilder

We packed almost everything on Code into the Database


10

Conclusion of the Migration Process

! ! ! !

Migration worked only with FormBuilder We needed only 1 Day to migrate 150 Forms Tests took 2 weeks Everything worked fine because we worked fine in the past
11

Forms 4.5 to 9i Forms


!

! !

Conversion ! Migration Wizard ! Forms Builder OTN Web Site Remember to start OC4J!

The migration from versions earlier than 6i is not supported. But may work!!! "
12

IT - Infrastructure
! !

The Migration Process is not the Main Problem The real Problem is:

You need the Oracle IAS 9i now! WHY?


13

Running on O9iAS
Current client/server apps now need O9iAS ! licensing ! administration ! Getting this wrong can kill your project ! Complex configuration ! Need experienced O9iAS admin ! Q: What killed the Reports Server? ! A: Permissions on the /tmp directory
!

14

Infrastructure of C/S

Developer Client Forms Reports Graphics SQL*Net

Database Server

15

Form Startup

WWW Browser

HTTP Server (mod_oc4j)

Forms Listener Servlet

JInitiator Applet Window

File System Forms Servlet HTML Startup File

Client

Application Server
16

Form Runtime
Forms Servlet
WWW Browser

HTTP Server
File System

JInitiator Window WWW Browser

Java Files Forms Files Forms Listener Servlet GIF Files Database

JInitiator Window WWW Browser

JInitiator Window

Forms Runtime Engine Forms Runtime Engine Forms Runtime Engine

Client

Application Server

Database 17 Server

Installation of iAS 9.0.2


!

Now you are ready to install the Oracle9iAS Infrastructure. The Oracle9iAS Metadata Repository, Oracle Internet Directory and Oracle9iAS Single Sign-On will be installed. Note: If you will be installing Oracle9i Application Server Business Intelligence and Forms and the Oracle9i Database Release 2 on the same machine, it is recommended that you clean off your machine. When you install Oracle9iAS Infrastructure, a database is also installed. This database stored the metadata repository for all the Oracle9iAS products and components associated with a repository. The unique instance name will be used to identify this installation of Oracle9iAS infrastructure.
18

We are on the way


!

Now that you have the Oracle9iAS Infrastructure installed, you will need to install the applications that will use the infrastructure. In this case, you want to utilize J2EE and Web Cache as well as Wireless, Portal and Discoverer so you will install the Business Intelligence and Forms install option. The Oracle Universal Installer should detect that you already have an Oracle9iAS Infrastructure installed and Single Sign-On is enabled.
19

Installation: Conclusion
! !

It takes much time to install the iAS 9i Rel 2 It also takes much nerves Sometime it works. The recomended Infrastructure for
! iAS 9.0.2 with ! Oracle 9.2 Database looks like this:
20

IT Infrastructure form iAS and Forms 9i


!

1st machine with Infrastructure DB (9.0.x) 2nd machine with iAS (Foms Server, .) 3rd machine or somewhere else: 9.2 Database Will be better in newer Releases
21

Configuring Forms Services


!

The Oracle Installer does the hard work


! It configures iAS

You only need to configure Forms itself


! formsweb.cfg ! default.env ! Registry.dat

And then run your application!


22

Configuring Forms Services


formsweb.cfg ! Specifies runtime parameters for Forms apps ! Client-server equivalent of command line options ! All parameters listed in Oracle9iAS Forms Services Deployment Guide on OTN.

23

Configuring Forms Services


formsweb.cfg ! Runtime parameters ! All settings can be set in the default section ! Application sections override default
formsweb.cfg File userid= form=test.fmx background= width=640 height=480 [order] userid=order/order@orcl form=orders background=order.jpg

24

Configuring Forms Services


formsweb.cfg ! Runtime parameters ! All settings can be set in the default section ! Application sections override default ! You can have many environments on one installation
formsweb.cfg File userid= form=text.fmx background= width=640 height=480 [order] userid=order/order@orcl form=orders background=order.jpg

25

Configuring Forms Services


default.env ! Specifies runtime environment variables ! Client-server equivalent of environment variables or Windows Registry entries

26

Configuring Forms Services


default.env ! Environment variables
formsweb.cfg File userid= form=text.fmx background= width=640 height=480 envFile=default.env [order] userid=order/order@orcl form=orders background=order.jpg

default.env File ORACLE_HOME=C:\Oracle\Forms9i FORMS90_PATH=D:\Work

27

Configuring Forms Services


default.env ! Environment variables ! Each app section can have an env file
orders.env File ORACLE_HOME=C:\Oracle\Forms9i FORMS90_PATH=D:\Orders formsweb.cfg File userid= form=text.fmx background= width=640 height=480 envFile=default.env [order] userid=order/order@orcl form=orders background=order.jpg envFile=orders.env
28

Some Scenarios

But how will our System run within some Scenarios of failures? Lets see

29

Agenda
! ! !

1 machine HTTP and Forms together 2 machines HTTP and Forms separate Load Balancing Configurations

30

One Machine (a)


Simplest configuration
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

31

One Machine (b)


Not dedicating memory and CPU to Forms Services
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

32

One Machine (c)


Single point of failure
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

33

Agenda
! ! !

1 machine HTTP and Forms together 2 machines HTTP and Forms separate Load Balancing Configurations

34

Two Machines (a)


Not load balancing
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

35

Two Machines (b)


HTTP server can be used for other purposes without taking resources from Forms Services
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

36

Two Machines (c)


Useful if one machine is not powerful enough for all components
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

37

Two Machines (c)


Configure MOD_OC4J in HTTP server to point to servlet engine on other machine
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

38

Two Machines (d)


Single point of failure
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

39

Two Machines (e)


Single point of failure
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

40

Agenda
! ! !

1 machine HTTP and Forms together 2 machines HTTP and Forms separate Load Balancing Configurations

41

1. MOD_OC4J Load Balancing

42

Load Balancing (1a)


OC4J load balancing (built into Oracle9iAS)
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

43

Load Balancing (1b)


Load balancing only occurs for the first request
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

44

Load Balancing (1c)


Forms Services not a single point of failure
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

45

Load Balancing (1d)


May overload remaining machine
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

46

Load Balancing (1e)


iAS Release 2 can restart OC4J servlet engines
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

47

Load Balancing (1f)


HTTP server still single point of failure
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

48

Load Balancing (1g)


Add more Forms Services as needed
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

49

Load Balancing (1h)


Add more Forms Services as needed
Client Tier Application Tier Database Tier

O C 4 J

F O R M S

H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

50

2. MOD_OC4J Load Balancing, but combining components

51

Load Balancing (2a)


If one machine becomes fully utilized, add another machine for Forms Services
Client Tier Application Tier Database Tier

H T T P

O C 4 J

F O R M S

52

Load Balancing (2b)


If one machine becomes fully utilized, add another machine for Forms Services
Client Tier Application Tier Database Tier

O C 4 J

F O R M S

H T T P

O C 4 J

F O R M S

53

Load Balancing (2c)


Better availability
Client Tier Application Tier Database Tier

O C 4 J

F O R M S

H T T P

O C 4 J

F O R M S

54

Load Balancing (2c)


Better availability
Client Tier Application Tier Database Tier

O C 4 J

F O R M S

H T T P

O C 4 J

F O R M S

55

3. External load balancer

56

Load Balancing (3a)


Use hardware/software Load Balancer to route requests between HTTP servers
Client Tier Application Tier Database Tier

H T T P L B H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

57

Load Balancing (3b)


Load Balancer may be hardware or software
Client Tier Application Tier Database Tier

H T T P L B H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

58

Load Balancing (3c)


Load Balancer must support session binding
Client Tier Application Tier Database Tier

H T T P L B H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

59

Load Balancing (3d)


If you dont have enough hardware, combine components
Client Tier Application Tier Database Tier

H T T P L B H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

60

Load Balancing (3e)


Load Balancer is a single point of failure, but less so than other components
Client Tier Application Tier Database Tier

H T T P L B H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

61

Load Balancing (3f)


Single point of failure cannot be eliminated; you need to weigh risk versus cost and hassle
Client Tier Application Tier Database Tier

H T T P L B H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

62

Load Balancing (3g)


If HTTP server goes down, not utilizing Forms Services behind it
Client Tier Application Tier Database Tier

H T T P L B H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

63

4. MOD_OC4J Load Balancing with external load balancer

64

Load Balancing (4a)


Use a combination of a Load Balancer, plus OC4J load balancing on each HTTP server
Client Tier Application Tier Database Tier

H T T P L B H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

65

Load Balancing (4b)


Only single point of failure is Load Balancer
Client Tier Application Tier Database Tier

H T T P L B H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

66

Load Balancing (4c)


If HTTP server or Forms Services goes down, requests routed to others
Client Tier Application Tier Database Tier

H T T P L B H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

67

4b

Load Balancing (4d)


If HTTP server or Forms Services goes down, requests routed to others
Client Tier Application Tier Database Tier

H T T P L B H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

68

Load Balancing (4e)


Any number of machines
Client Tier Application Tier Database Tier

H T T P L B H T T P

O C 4 J

F O R M S

O C 4 J

F O R M S

69

5. MOD_OC4J Load Balancing with external load balancer, plus a router

70

Load Balancing (5a)


Allows for separate HTTP server for Forms, and for other requests
Client Tier Application Tier Database Tier

L B
R O U T E R

H T T P

O C 4 J

F O R M S

H T T P

O C 4 J

F O R M S

H T T P

71

Load Balancing (5b)


This means you can size for Forms
Client Tier Application Tier Database Tier

L B
R O U T E R

H T T P

O C 4 J

F O R M S

H T T P

O C 4 J

F O R M S

H T T P

72

What to do?
! !

You see, you are depending on the count of Servers To make sure the System is running you need at least:
! 1 (or 2) iAS machine ! 1 DB machine (like until now)

Small Projects will die


! How will I explain my customer, that he needs for 5 or 10 clients 2 or 3 or even more Servers?

My customer decided as follows:


! Critical Users will work with 6i Client/Server ! Non Critcal Users will be changed to Intranet with 9i

OR
73

Kostenlose Werbung ask: Weichselberger, Stmmer, Hofmann

Lets wait for the

GRID*
* BUT: how are the costs for the servers (hardware and administration)?
74

Migration
!

But also the Migration is not so easy like it looks Lets see some points of Interest:

75

Components to be removed in Forms 9i

76

Oracle Graphics is dead, long live BI beans

38 page White Paper how to integrate Graphics and Forms 9i

77

Forms 9i New Features

78

Obsolete Features in Forms 9i

79

Where is my Menu?

80

Where are the Data for my LOVs?

81

Where are the Data for my LOVs?

82

How much Data may be entered?

83

Stricter Enforcement of Triggers and Built-Ins

84

Stricter Enforcement of Triggers and Built-Ins

85

Stricter Enforcement of Triggers and Built-Ins

86

Where are all my Icons* gone?

* In the Forms Builder still ico


14 page White Paper how to deploy Icons in the Web

BUT .....

87

Client/Server architecture
Host OLE2 Database

ORA_FFI

OLE Containers

Desktop drives
88

Web-deployed architecture
Host Database

ORA_FFI

OLE2

unix
89

Going back to the application


The following features will not work with web deployment ! Third party workflow ! Address validation ! D2KWUTIL ! Calls to .DLL and .EXE files ! Integration with MS Word ! Production of Excel spreadsheets ! Upload files ! Reading registry without making changes ! This is not an upgrade, it is a migration
!

90

Porting to Unix
Watch out for : ! case sensitivity ! embedded file names ! directory separators ! O9iDS is less usable on Unix ! Not supported on terminal emulators
!

unix
91

Introducing WebUtil
! !

Oracle Beta Pre-Production software Client side versions of old favourites


! ! ! ! ! ! ! ! ! ! ! CLIENT_HOST CLIENT_TEXT_IO CLIENT_OLE2 CLIENT_GET_FILE_DIR CLIENT_TOOL_ENV CLIENT_WIN_API_ENVIRONMENT WEBUTIL_FILE_TRANSFER WEBUTIL_HOST WEBUTIL_C_API WEBUTIL_CLIENTINFO WEBUTIL_BROWSER

New features

All straight PL/SQL calls

92

Limitations of WebUtil
Uses Pluggable Java Components ! Require PJC instantiations
!

!Not useable in many triggers # Use timers !Can only use in Forms, not Reports or Menus # Create one-off Forms

Cannot get a Windows handle ! Not always the best approach


!

! CLIENT_TEXT_IO ! CLIENT_OLE2
93

So, do I have to become a Java head?


Must know how Java CLASSPATH works ! ORA_JAVA requires some familiarity with: ! classes ! inheritance ! May need to write your own Java class
!

94

Migrated functionality
Through ORA_JAVA ! Third party workflow ! Address validation ! Through WEBUTIL_C_API ! Complex technical calculations ! Terrain mapping ! Through CLIENT_OLE2 ! Integration with MS Word ! Production of Excel spreadsheets ! Through WEBUTIL miscellaneous ! Upload files ! Read registry
!

95

Lost functionality
Help files ! Using Notepad to edit items ! Performance ! Using Forms to launch apps ! Using timers instead of W-N-F-I ! CLIENT_OLE2 time lag ! IDENTIFIED EXTERNALLY ! DLL transactions
!

96

So What Alternatives To This?

97

JACOB & Others


!

JAva COm Bridge


! Open Source ! http://danadler.com/jacob/ ! Similar APIs to ms.com classes (simple method) but not dependant on Microsoft JVM

Intrinsyc (Linar) J/Integra


! Not free but trial available ! Have an Add-in for Oracle9i JDeveloper jacoZoom www.infozoom.de
! Again not free but can evaluate
98

Some Design Considerations


!

Move SQL code to the database


! Good idea with any environment

Do some of the standard Forms features make sense on the Web?


! Toolbar buttons ! Enter Query mode ! MDI windows ! Next Record, Next Block, Clear Form

Set user expectations (use OLAF?)


99

OLAF
Oracle Look And F eel
! Rounded everything: buttons, scrollbars ! Animated alert icons

! lookAndFeel=oracle
!

Pre-designed color palettes for


! Blue, Khaki, Olive, Purple, Red, Teal, Titanium

Oracle look and feel

! colorScheme=olive
!

Background density ! darkLook=true

100

101

Neat OLAF Parameters


!

LOV button ! Button appears automatically if item has an LOV ! In registry.dat file on the app server:
app.ui.lovButtons=true

Required items with yellow background (registry.dat)


! app.ui.requiredFieldVA=true ! app.ui.requiredFieldVABGColor=255, 242,203

Read-only items with light gray background ! ServerArgs again


! readOnlyBackground=true
102

Fonts and Colors


Fonts are different
! Use fonts with a Java equivalent ! There are only a few fonts in Java Dialog, Serif, SansSerif, Monospaced, DialogInput
MS Sans Serif becomes Dialog

! Font substitutions in Deploying Forms Applications to the Web with Forms Server design chapter 7 ! Use 9 point translates better than 8 point ! Use Display Items if nothing else works ! registry.dat contains font mappings
!

Use visual attributes for buttons


! The Windows manager does not color them as it does in client/server
103

The Fastest-Loading Design


! !

Reduce the number of items E.g., logon form


! After validating the user, issue a NEW_FORM to a menu form

Small initial forms break up the startup time


! Forms Server process startup ! Loading form into memory ! Loading library code

Achieve startup times of 5 seconds!


! From the URL click to the form appearing
104

Use JavaBeans
!

Unlimited design elements


! Anything you want to use as an extension ! File browser; spell checker; animated dogs

Roll your own Pluggable Java Components (PJCs)


! Replace objects such as buttons and items ! Or use a Bean Area - layout object
Use custom trigger and get and set properties JDeveloper can help create these

Lots of samples on OTN


! Look for white paper: Oracle9i Forms in a Java World

Import Java methods


! Program | Import Java Classes

?
105

Why Use Java?


!

Allows you to interact with the client machine


! Do FFI or DDE ! Use the ORA_JAVA built-in package in Forms 9i

Include any Java component


! Java components have many possibilities ! Easily extended and customized

Leverage existing Java code


! For computation or business rules ! OO handling of data

Get experience with Java


! Extending forms applications is a small step towards learning about Java
106

System Variables
!

Some values are different from client/server


! :SYSTEM.MOUSE_BUTTON_SHIFT_STATE
$ $

In c/s,Ctrl+ for control key and mouse button In Web Forms, it is Control+

! :SYSTEM.MOUSE_BUTTON_PRESSED
Normally 1 and 3
For left and right button

The docs mention that this is platform-specific

Web Forms: 1 and nothing


!

Use :SYSTEM.MOUSE_BUTTON_MODIFIERS
! O/S non-specific; Info in help system Find tab

Test for the environment: get_application_property( USER_INTERFACE) = WEB

107

Operating System Calls


!

Forms runs on the app server


! The host operating system is on the app server

! ! !

HOST built-in runs on the application server Registry reads and writes go to the app server Other operating system facilities:
! ! ! ! ! OCX and VBX OLE and DDE User exits OTN white paper describes a HINT.PLL solution using Java COM Bridge (JACOB). Be careful when changing environments (moving from Windows to UNIX) ! Will not display on the client
108

Operating System Calls


!

ORA_FFI operates on the app server


! FFI calls may break if you port to another O/S

The same for TEXT_IO and printing


! If the server can see the client machine, you can read and write client files with TEXT_IO ! For printing and TEXT_IO, use ORARRP
Oracle utility Works for Reports; OTN has details

Use WEB.SHOW_DOCUMENT ! Opens the browser and a URL

Preview on OTN: WebUtil.PLL for 9 i that includes some functions of D2KWUTIL.PLL


109

Startup Parameters
Placed in the HTML startup file (serverArgs) Default is an MDI frame
! You can turn Multiple Document Interface off ! usesdi=yes
!

! !

Run form in the browser window


! Not separate window ! separateFrame=false

Splash page that shows while Forms loads


! Can trick the users ! splashScreen=co_logo.gif
110

Other Tips and Differences

! !

Locate app server close to database server Key mappings are different
! Uses FMRWEB.RES by default ! Substitute FMRPCWEB.RES for the same key mapping as client/server ! These are editable ASCII files
In ORACLE_HOME/ FORMS60 directory

No magic menu items for Cut, Copy, Paste


! Ctrl-X, Ctrl-C, Ctrl-V do work ! Use CUT_REGION, COPY_REGION, PASTE_REGION instead

Turn off menu buffering


SET_APPLICATION_PROPERTY(MENU_BUFFERING, 'FALSE');

! Fewer network messages (menu is not resent)

111

Other Tips
!

This doesnt work:


SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, WINDOW_STATE, MINIMIZE)

Disappearing canvas tips


! Increase space between stacked canvases if one disappears
They might be slightly overlapped on the Web

! Use SHOW_VIEW() to display a shy canvas


!

Update to the latest mouse drivers


! Otherwise, the mouse buttons may not work if you switch the mouse buttons for left-handed mousers ! Logitech or Intellimouse
112

Tuning Options prior to Web Forms


Database access
! Optimize SQL access ! Array fetches, etc
!

Application tuning
! Good coding practice ! Efficient code, etc ! Lots of advice out there

Client hardware
! The more memory and CPU, the better

113

Additional Tuning Options for Web Forms

(Tips on the previous slide still apply)


! !

Network Tuning Oracle Application Server Tuning

114

Reduce Items on the Screen

Objects that display on a screen need to be initialized Less items on an initial screen speeds up performance
! Have a lean first screen ! Hide items that are not needed

115

Reduce Items on the Screen: Tab canvases


!

Tabbed canvases
All items are downloaded to client Results in a possible large initial download time

116

Reduce Items on the Screen: Tab canvases


!

Tabbed canvases
Use hidden stacked canvas on each tab to defer download Trade off: possible delay when user navigates to tab for the first time

117

Promote Similarities
!

Similar items are likely to be handled by the Forms smart delta messaging
! Only the differences are sent across the network

Promote similarity in the UI


! Use Property classes and Object groups ! Use Inheritance where possible
118

Resources on the Web


OracleWorld: www.oracle.com/oracleworld Oracle Technology Network: otn.oracle.com
! Mostly 9i now, but links exist to 6i material
! otn.oracle.com/products/forms/techlisting9i.html ! otn.oracle.com/docs/products/forms

! !

! Migrate to the Web


otn.oracle.com/products/forms/htdocs/upgrade

! Migration Assistant - from Forms 6i to 9i


otn.oracle.com/software/products/forms
! !

IOUG Technical Repository: www.ioug.org ODTUG web site: www.odtug.com


119

120

Vous aimerez peut-être aussi