Transcript Document

Web Forms:
What Works and
What Doesn’t?
Peter Koletzke
Perception
You can always
deploy client/server
forms on the Web
without changes.
Agenda
• Overview of the architecture
• Tips and techniques
• What’s new with R.6/6i?
• Advice and conclusions
Framework for this Talk
• Attempting Web Forms in
production
 Developer 1.5, 1.6, 2.1, 6.0
 Your mileage may vary
• Observations and comments
by other users
• Paper reviewed by Oracle
Survey
• Who’s tried Web Forms?
(a.k.a., Web-deployed forms, Forms Server)
• Used it in production
 R.2, R.6?, R6i?
• Happy with it?
• Favorite thing?
• Unhappy with it?
• Least favorite thing?
Why is this Question Worth Asking?
• Oracle is seriously promoting the
technology
• Mixed reports – from Oracle and
from users
 What else is new?
 Different because this is the Web
• Some people are confused about
how Web Forms works
• Some try it, and become
frustrated and discouraged
• Some rush in like a pack of
lemmings diving into the ocean
Architecture
• Multi-tier
 Client
 Application server (also called “the client”)
 Database server
• New Developer working
environment




Need to copy files to app server
Need to compile on app server
Pre-R.6: run the browser to test
R.6: use the “Run Form Web” button
• Best understood by examining
the communication flows
Forms Server Flow: Form Startup
• Client browser requests the startup
HTML file using the Uniform
Resource Locator (URL)
• Web Listener finds file in the file
system
• Listener sends HTML back to the
browser
Client
Application Server
File System
WWW
browser
HTML
Web Listener
Startup File
Forms Server: Flow Form Running
• HTML file requests loading of Java
files
 Class libraries and applet window (JInitiator)
• Listener sends files to client
browser
• Browser starts applet window
(“Forms Client”)
• Listener requests runtime session
from Forms Server Listener
• Forms Listener connects Forms
Runtime to client
• Forms app runs on app server but
displays on client in applet window
Application Server
Web Listener
File System
Client
Java Files
Database
Server
Forms Files
WWW
browser
Forms Server
Listener
GIF Files
Database
Applet
window
Forms Runtime
Engine
Why is This Better?
Centralization of runtime
Centralization of code
Centralization of
maintenance
Centralization of
administration
“Thin” client
Easily scalable
Highly available
Average Number of Packets
450
400
350
300
Developer
Web
Windows
Terminal
Developer
C/S
250
200
150
100
50
0
Data entry Navigation Query
Validation
Why is This Different?
• The form is running on the app
server not the client
• Only the presentation layer is
on the client
• The presentation layer uses a
Java window
• Forms objects are rendered in
Java classes
• The environment is Java
Where Does Web Forms Run?
Tip: Read The Manuals
• Yes, there are manuals - online
 Form Builder menu: HelpManuals, Online Manuals
• Guidelines for Building Applications
 “Deploying Applications on the Web” chapter
• Configuring the Oracle Developer
Server
• Mandatory reading




“Feature restrictions”
Font mapping
Startup HTML file
Introduction to the Forms Server
• Search for Note 68814.1 on
MetaLink for setup tips
 OOW 2000 Paper on Forms Server
Tip: Read the White Papers
• 1. Oracle Developer Server Technical FAQ
• 2. Oracle Developer Server:
How to Tune Deployment of
Internet Applications
• Oracle Technology Network
 Link from the opening page
to products - Forms, Developer
http://technet.oracle.com/products/developer
http://technet.oracle.com/products/forms
These may change
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
 Web Forms: “1” and nothing
The docs mention
that this is
O/S-specific
• Test for the environment:
get_application_property(USER_INTERFACE) = ’WEB’
Use
:SYSTEM.MOUSE_BUTTON_MODIFIERS
• O/S independent
• No need to test for
USER_INTERFACE
• Returns values like:
"Shift+”
"Caps Lock+”
"Control+”
"Alt+"
"Command+"
"Super+"
"Hyper+”
• Documented in the help system
 Use the Find tab to locate the topic
Operating System Calls
• Forms runs on the app server
 The host operating system is on the app server
• HOST built-in works on the
application server
• Registry reads and writes go to the
app server
• OCX, OLE, DDE, HINT.PLL don’t work
• ORA_FFI and TEXT_IO operate on the
app server
 If the server can see the client machine, you
can read and write client files with TEXT_IO
 Same idea with printers
 FFI calls may break if you port to another O/S
Why Worry About This?
Trigger Considerations
• Some mouse triggers don’t work
 WHEN-MOUSE-ENTER
 WHEN-MOUSE-LEAVE
 WHEN-MOUSE-MOVE
• Be careful with form-level mouse
triggers
• Avoid other mouse triggers
 WHEN-MOUSE-CLICK, WHEN-MOUSE-UP, and
WHEN-MOUSE-DOWN
 Extra network traffic
• Trigger events are bundled and
sent as one packet
 Item triggers, for example
Other Tips and Differences
• Use the most current version of
JInitiator
 No client install - downloads when needed
 You can use IE or Netscape - any version after 3
 Not required for IE v.5, but recommended
• 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/
• No magic menu items
for Cut, Copy, Paste
 Ctrl-X, Ctrl-C, Ctrl-V do work
FORMS60 directory
Tuning
• Simplify the user interface (UI)
features, in general
• Reduce the size of the first form
 Faster to start up the application
 Use the splash page trick
 Syntax later
• Reduce Bandwidth
 Avoid timers
 One-time triggers are OK
 Avoid extra graphics
 Use rectangles and lines, no circles or curves
More Tuning
• Use the prompt property not
boilerplate text
• Hide objects not initially
required
 Set the Visible property to “No”
• Development tuning: use a
form “shell”
 A form that starts other forms
 Compile your forms and start from a running
form (the shell)
 Helps speed up development
 Especially useful in the Web environment
Windows and Canvases
• There is no MDI window in R.1
and R.2
 You can show multiple windows
 To show the console (status line), set the
form property Console Window
 No MDI toolbar - use menu or window
toolbar
• Developer R.6 has MDI
windows
• Consider not using a
toolbar
File Edit View Insert Window Help
 Not an HTML standard
 Use canvas buttons instead
Visual Aspects
• Use visual attributes for buttons
 The Windows manager does not color them
as it does in client/server
• Toolbar icons are .GIF files
 Not .ICO files
 Should be located with the forms files
• Fonts should have Java
equivalent
 There are only a few fonts in Java (Dialog, Serif,
SansSerif, Monospaced, DialogInput)
 MS Sans Serif becomes Dialog, use 9 point
 Documented in Chapter 2 of the manual
Memory Issues
• Memory on the app server
 Each client connection takes a chunk
 Some memory is shared
 Code segments and boilerplate
• Memory on the client
 OPEN_FORM takes more memory
Oracle can get
100-500 users
per CPU
 Form startup will be faster if you return to an open
form
 NEW_FORM releases client and server
memory
 If no one else using the form
 Requires more startup time
New R.6 Parameters
• Used 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
More R.6 Parameters - OLAF
• “Oracle look and feel”
 Rounded buttons, scrollbars, everything
 Animated alert icons
 lookAndFeel=oracle
• Pre-designed color palettes for
Oracle look and feel
 Blue, Khaki, Olive, Purple,
Red, Teal, Titanium
 colorScheme=olive
• Background density
 darkLook=true
• LOV button
More R.6 OLAF
Parameters
 Button appears automatically
if item has an LOV
 In registry.dat file on the app server:
app.ui.lovButton=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”
Other New R.6 Stuff
• You can use JavaBeans in Web
Forms
 Replaces objects such as buttons and items
 Can also use a Bean Area
• HTTP 1.1 support
 Full production with v.6i
 Details in white paper 2 (mentioned above)
• Run Form Web button
 Tests the form in a JVM
 Use this frequently
 Also test the form on the Web
Advice
• Mostly common sense
 Do careful tests of this environment
 Note the things that work differently
• Get on the list serves & forums
 IOUG-A - www.ioug.org
 ODTUG - www.odtug.com
• Learn to use the word “deployment”
(not Web Forms)
 Forms running on the Web using
the Forms Server
• Remember that Oracle Apps
are a driving force
 R 10.7 is web-enabled, 11i is only Web
 Apps are the biggest user of Developer
Advice
• Set user expectations
 It’s not client/server, it’s web-deployed
Forms! Read the docs and white papers
• Keep in mind that this is a new
environment
 There will be a new set of workarounds and
bugs for the Web
 Expect response time and look and
feel to be different
Conclusions
• You can deploy on the Web
• Performance improves daily
• Centralization, centralization,
centralization
• Intranet, Extranet, Internet
• Client/server apps may not
run the same way on the web
 You must design for the Web
 Trigger and other differences
Conclusions
• Although it is the same tool, it
is a totally new environment
• R.1 was beta
• R.2 is V.1 is useable, but a bit
bumpy
• R.6/6i holds some promise
Author Contacts
• Peter Koletzke
 http://www.quovera.com
 http://ourworld.compuserve.com/
homepages/Peter_Koletzke
• Oracle Press books:
• Oracle Developer Advanced
Forms and Reports
• Designer Handbook, 2nd Ed.
• Watch for JDeveloper book in
early 2001
• All co-authored by Dr. Paul
Dorsey