Professional Documents
Culture Documents
Cheryl P. Jalbert
Thomas H. Musson Jeffrey S. Haidet Keith W. Hare Jeffrey S. Jalbert
Abstract
Users of Oracle Rdb have sometimes expressed frustration with whatever forms products they were using with Rdb. Consequently, when someone suggests huge advantages from using the Oracle toolset, many Rdb experts are dubious. This session will address some of your questions and go well beyond those questions into the hints and kinks of successfully combining Oracle Rdb and Oracle Forms to empower users, significantly enhance developer throughput and improve your flexibility relative to hardware platforms. The attendee will understand the management tasks associated with using Oracle Developer with Oracle Rdb.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
Schedule
q
q q
Assumptions
q q
You have one or more existing Rdb databases. You lack a satisfactory GUI (Graphical User Interface). You need to provide either a data warehouse / decision support system or you need to add some of those capabilities to your existing TP applications. Your existing UI took time to create and takes time to enhance. You need a quick success. Time is an important factor. Does this sound familiar?
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
Configurations
Traditional Classic Client/Server Multi-dimensional Client/Server New Ways with Terminals Windows Terminals Thin Clients on the Web Other
q q
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
Traditional
Remember main frames and terminals?
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
Classic Client/Server
The client provides the user interface. The server provides the database.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
Multi-dimensional Client/Server
A client relies on a server to provide a resource.
Production DB Server
Training DB Server
File & Print Server for Remote Office Mapping Application Server for Remote Office
Clients
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
You can produce forms for terminals & PCs from the same development project.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
Windows Terminals
New wrinkle on an old scheme that centralizes management
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
10
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
11
Client
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
12
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
13
Advantages
You can use Oracle Developer with terminals. You can develop forms that use the same code for windows or dumb terminals on VAXes. Oracle Developer compares well with other forms packages for dumb terminals. Terminals provide centralized management. You may have a set of terminals in place.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
14
Disadvantages
Oracle has shown no interest in keeping terminal support current. You will be stuck with Version 1.3.2 for your work with terminals. Developing for dumb terminals is much more tedious. Dumb terminals lack real estate. Dumb terminals do not support
q q q q q q q
icon buttons pull-down menus color changes for subtle clues graphics integration with newer technologies navigation with a mouse pop-up alerts
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
15
Windowing Devices
q
Advantages
Newer technology
q q
Oracle development is ongoing. Components that can be integrated are hot items.
Prototyping a form for user review is quick and easy. Fewer and fewer people need to be taught the basics of how to use the application that you develop. Use of your application is supported by
q q q q q q q
icon buttons pull-down menus color changes for subtle clues graphics integration with newer technologies navigation with a mouse pop-up alerts
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
16
Windowing Devices
q
Disadvantages
Costs may be higher
q q
because you have terminals in place because you have PCs in place and cant control the maintenance costs You may need to disable mouse navigation for heads down data entry.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
17
Data
Thin Client
Thick Client
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
18
Your Choices
q
Thin Clients
WEB Can minimize network traffic. Can reduce systems work (by ignoring the systems work for the client).
Thick Clients
Use the database to address access issues. Use the database to audit. Use the database to ensure consistent results. Can maximize reusable components. Can enhance standardization. Can minimize network traffic. Can reduce systems work.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
19
q q
Now, its Oracle Developer (without the 2000). Oracle Developer V6.0 is out.
Forms V6.0 Reports V6.0 Graphics V6.0
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
20
Database
Oracle 7 or 8 Rdb (Use Version 7.0 or higher to use SQL*net.)
User Interface
Developer Forms (Version 5.0.6.10.0 is out.) For VMS terminals (Developer V1.3.2, Forms V4.5.7.1.6)
Operating Systems
VMS NT W95
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
21
22
Other data stores Other clients Other operating systems ActiveX controls Batch processing eXcel and such Icon editors Documentation support
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
23
Design Choices
q
Style(s) of use
unanticipated queries heads down data entry query only access limited audited toolbar menus buttons hot keys graphics exceptions
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
Styles of presentation
24
An Example
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
25
Example Form
Notice the Menus & the Toolbar & the special buttons at the bottom for audit or notes or other things.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
26
The dark blue background is a clue to the user that this isnt part of the query area.
27
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
Several things are obscured here to avoid revealing company confidential data, but the thing of interest to you is this button.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
28
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
29
Introduction
q q q q q q q
Parts that you will produce Tools that you will use First steps Special requirements for Rdb The user view and default functionality Standards and how to make things easy Pointers to intermediate topics
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
31
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
32
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
33
Getting Started
q
Click OK.
(We will choose Build a new form manually in order to look, first, at some of the tools that you will use.)
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
34
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
35
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
36
Module
Forms file FMB extension Generates an FMX extension, when generated or run, (if you have the compile before running option checked.)
Block
Blocks for tables Blocks for buttons Blocks for a toolbar Blocks for other types of things One or many blocks per module Displayed in frames
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
37
Canvas
Display surface for blocks (in frames) and text. Each block must be assigned to a canvas. A canvas can include many blocks. One or more canvases per module.
Window
View of a canvas or many canvases. Users view of what youve created. Windows can be re-sized and moved by the user and, also, programmatically.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
38
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
39
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
40
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
41
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
42
Object Navigator
Lists each different type of object and the objects in that type for each module that is open for development work. Main work space Details can be expanded or contracted on the display
Property Palette
Easy way to change the characteristics of objects. Not all characteristics will be of interest for all objects.
Layout Editor
Editor for the form presentation. Where graphics and text is added. Easy place to add buttons and extra fields.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
43
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
44
45
46
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
47
q q
buttons colors
q q
alignment fonts
q q
The tools for changing things are on the left side. The canvas is shown selected.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
48
Your Tools
The tools work together. In the example, the payment canvas is selected for q Object Navigator q Property Palette q Layout Editor
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
49
To add one of the objects q select that object type q press the green +
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
50
51
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
52
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
53
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
54
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
55
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
56
Use the Find window to search for your table. Use the % as a wild card in the Find window. Or Scroll to the table that you want.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
57
58
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
59
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
60
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
61
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
62
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
63
Form layout style arranges columns vertically. Tabular layout style arranges columns horizontally and works well with multiple rows.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
64
Other Choices
q
The Frame Title (block title) is displayed above the display of the fields. (You can leave it blank.) If you use 1 as the number of Records Displayed, the other two fields should be left as the defaults.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
65
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
66
Frames
Display container for a block Displayed on a canvas Find it as an item under block in the Object Navigator
Issues
With the V2.0 Layout Wizard, you may need to adjust the dimensions of the frame after you receive exception messages from the Wizard. A large number of fields or any fields with a large number of characters may cause difficulties. If your fields spontaneously rearrange themselves!, it is because the frame property Update_layout is set to automatically (instead of manually) in the Property Palette.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
67
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
68
With a free-hand approach to the Layout Editor Using the Pull-down Menus for the Layout Editor Changing properties in the Property Palette Using a combination of the Layout Editor Toolbar and free-hand Changing navigation order in the Object Navigator
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
69
70
Format
Font
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
71
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
72
Alignment
Choose how you want the selected fields aligned q horizontally q vertically You can then group the items.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
73
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
74
Fonts
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
75
Rearranging the column layouts Changing labels Changing fonts Changing query criteria
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
76
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
77
Check on the position and size of a field that you would like to use as a starting point. Arrange other fields relative to this one.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
78
79
Editing Prompts
When you edit a prompt and then press return, you will get this pop-up. You can then edit further.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
80
For text fields, one of the things that you may want to change is the NO default for Case Insensitive Query.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
81
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
82
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
83
Adding Color
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
84
Rearranged Form
View of the form in the layout editor. There are visible and invisible changes to make yet.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
85
86
When you change the window name, Developer 2000 does not lose the association between the window and the canvases displayed in the window. Expect this same flexibility in other name changes.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
87
Window Size
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
88
Use the Object Navigator to determine the order in which the fields are visited. q Drag and drop so that first_name is the first field. q Etc.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
89
The special tuning that was required to use Developer 2000/Forms with Rdb is less necessary starting with Version 7.0 of Rdb and Version 5.0 of Forms. With some versions, you will still need to understand the special requirements. Satisfying the special requirements makes good examples of how to manipulate Forms. Examining these issues is an interesting look at how Relational Database Management Systems differ.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
90
We will discuss q Each issue q Reason for each issue q Current status of each issue
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
91
Module
Savepoint Mode = False (Default is True in earlier versions. Property is not shown in Forms 5.)
Block
Enforce Primary Key = Yes (Default is No.) Key Mode = Nonupdatable (Default is Unique for pre V5 or Automatic for post V5.) Locking Mode = Delayed (Default is Immediate for pre V5 or Automatic for post V5.)
Items
Primary Key = Yes, for one or more items (Default is No.) Maximum Length and Query Length must be one character longer than in the database, if using ODBC in some versions.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
92
Oracle7 supports savepoints for sub-transactions. Oracle Rdb does not. Set the modules Savepoint = FALSE, if you are using
Developer/2000 prior to Release 2.0, which is also Oracle Forms prior to Release 5.0
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
93
Key Mode
Oracle 7 uses key mode unique for the system generated keys. Oracle Rdb requires key mode updatable or non-updatable. JCC uses non-updatable for Rdb.
(Continued)
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
94
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
95
This still applies: For attributes that are part of the key
Set Primary key = Yes To enforce the primary key, Developer 2000 must know what the key is.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
96
Notice that there is NO illustration of this for Forms 5 & Developer 2000 V2.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
97
Enforce Primary Key = Yes (Default is No.) Key Mode = Nonupdatable (Default is Automatic.) Locking Mode = Delayed (Default is Automatic.)
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
98
Primary Key = Yes, for one or more items (Default is No.) Maximum Length and Query Length must be one character longer than in the database, if using ODBC.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
99
q q
Improvements in the software have made the Rdb connection more transparent. There is still value in defining table keys. There is still value in understanding the issues.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
100
A User View
To understand how to use Developer 2000, you must understand what your application user will see from the choices that you make. Developer 2000 provides significant functionality by default. q Pulls in metadata q Establishes defaults for
q q
101
q q
More ...
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
102
Querying
q q q q
Specifying the query criteria: q Any subset of the fields available q Exact matches q Wildcarding q <, >
103
Help
Choosing Help on the default Help menu displays the property palette information on the item selected.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
104
Hot Keys
Choosing Keys on the Help menu displays this form. Notice q F1 is Help q F7 is Enter Query q F8 is Execute Query q You can scroll for more.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
105
Printing
q
Since many forms are wider than tall, printing in landscape mode is usually best. D2000 defaults to portrait.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
106
Summary
q q
Forms is a powerful multiplier of your work. Forms does some things by default.
Help for you with the metadata. Connecting to the database. Pull-down menus. Toolbar. Querying. Help. Hot Keys. Printing. More
107
Property classes (domains) Visual Attributes Program Units Object Libraries Property Classes vs. Object Libraries Templates
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
108
Component Software
q
Baby Steps
Create generic functionality Gradually refine functionality as needed for applications Maintenance made easier
Application
Refine
Level 2 Level 1
Refine
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
109
110
A property class is a first generation Developer 2000 building block for application development.
Property classes allow for some level of standardization of a Forms application A property class is an entity that allows common items to have properties set automatically as well as custom event triggers automatically associated with the appropriate item Property classes are very similar to Oracle Rdb domains ID code name date money date/time code text summary money comment and others ...
111
Examples:
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
Format Masking
MM/DD/YYYY MM/DD/YYYY HH:MI:SS DD-MON-YYYY etc
q q
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
112
Visual Attributes
q
q q
Color, font, and other visual properties that could be assigned to various objects Allows the interface to have a standard look and feel Examples:
Current record highlighting in a multi-record block Highlight the current item in a form Company Logo Etc.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
113
Program Units
q
Program units are PL/SQL procedures and functions that are encompassed in a form Used for tasks that could potentially occur multiple times in a single form Example:
JCCs GET_ID functionality Override Developers default assembly of the query Population of default values when creating a new record Etc.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
114
115
116
The Object Library is a Developer 2000 second generation mechanism used to store objects that can be referenced by forms Objects can include:
Blocks and Items Property Classes Visual Attributes Program Units Etc.
The Object Library is a means to allow for the reuse of commonly used components Places development standards in a single location
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
117
Object Libraries are opened automatically when you start the Forms Designer
Makes objects immediately accessible
Do not need to drag and drop all objects into your active form to make objects available
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
118
Property Classes
Can contain property classes, but not all items in pre-Developer 2.x could be subclassed (Program units) Must have Property Class module open in order to drag in and drop property classes to make them available to a form Only way to implement inheritance pre-Developer 2000 Release 2.0
Object Libraries
Can contain ALL types of objects that do not have to be copied (subclassed) into forms in ordered to be referenced
q
This includes Property Classes, Program Units, Windows, Canvases, Visual Attributes, Items, Toolbars, etc.
The Object Library opens automatically when the Forms Designer is opened making objects immediately available. New feature in Developer 2000 Release 2.0 that truly implements inheritance (linked during compilation)
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
119
Developer Templates
q
A template is a starting form that you use to build other forms. It is not a true inheritance structure but can utilize inheritance structures like items from the Object Library. Templates may include (either referenced or nonreferenced):
Toolbars Program Units Canvases Attached Libraries Etc.
120
Property Classes
These structures store property settings for forms, blocks and items
q
Templates
This structure provides a starting point for form creation
q
Object Libraries
This structure is a common storage location for all generic items.
q
JCC recommends using a template that references an object library since templates themselves are not a true inheritance structure
Use Object Libraries to store items such as Property Classes, toolbars, menus, etc.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
121
References
122
Summary
q
This section provided an overview of the concepts of application development and mapped software engineering terminology into Developer functionality Developer has the hooks to allow for flexible and maintainable applications By using the inheritance structures, JCC has found standards and functionality easier to develop, maintain and implement.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
123
Radio buttons Stacked canvases Alert boxes PL/SQL Triggers (forms triggers) Creating your own toolbar or menus
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
124
Advanced Topics
Additional Topics
q q q
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
126
Exceptions
q
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
127
Developer Exceptions
q
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
128
Exceptions are first raised in the begin-end block where the exception occurs, then higher-level begin-end block, etc.
E.g. Begin begin begin <exception occurs> end; 1 end; 2 end; 3
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
129
Exception clause
begin <executable statement> exception when <named exception> then <executable statements> when <named exception> then <executable statements> o o o when other then <executable statement> end;
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
130
On-Message trigger
Create a trigger at the form level that filters messages you do not care about
:System.Message_level
This system variable represents what severity level of messages should be suppressed by the default exception reporting
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
131
On-Message Trigger
q
On-Message
/* Built-in: ERROR_CODE,ERROR_TEXT,ERROR_TYPE ** Trigger: On-Message */ DECLARE errnum NUMBER := ERROR_CODE; errtxt VARCHAR2(80) := ERROR_TEXT; errtyp VARCHAR2(3) := ERROR_TYPE; BEGIN IF errnum = 40400 and errtyp = FRM THEN -- This is that stupid "Transaction complete: XXX records applied and saved" message. Null; ELSIF errnum = 40405 and errtyp = FRM THEN -- This is that stupid "No changes to apply" message. Null; ELSIF errnum = 0 THEN -- This is that stupid non-message ("-0:") message. Null; ELSE /* ** Print the Normal Message that would have appeared */ Message(errtyp||-||TO_CHAR(errnum)||: ||errtxt|| on ||:system.trigger_item); END IF; end;
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
132
:System.Message_level
q
declare save_message_level char(2); begin save_message_level := :system.message_level; :system.message_level := 10; -- Ignore 0, 5, 10 select x into :block.item from y where z = 2; :system.message_level := save_message_level; end; Note: Exceptions are still raised, only reporting to the user is suppressed. You should use this one carefully!
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
133
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
134
Problem: Need to record client exceptions Problem: Need to be able to access the exception data without having access to the machine Problem: Need to capture exceptions even when developers forget to implement exception handling Solution: A procedure that logs client exceptions on the server and use a default exception handler
Records client exceptions Output is on server Catches all exceptions
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
135
Comc.record_exception
This is a library (COMC) procedure which calls a database stored procedure. The database stored procedure writes information to a log file.
q
This will be described in more detail in the next section, aptly named Stored Procedures
On-Error trigger
Create a trigger at the form level that logs exceptions
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
136
On-Error Trigger
q
On-Error
/* ** Built-in: ERROR_CODE,ERROR_TEXT,ERROR_TYPE ** Example: Reword certain FRM error messages by checking ** the Error_Code in an ON-ERROR trigger ** Trigger: On-Error */ DECLARE errnum NUMBER := ERROR_CODE; errtxt VARCHAR2(80) := ERROR_TEXT; errtyp VARCHAR2(3) := ERROR_TYPE; BEGIN /* ** Log the message are where it occurred. ** ** Print the Normal Message that would have appeared. */ comc.record_exception(comc.form_event,Property class ||errtyp||-||TO_CHAR(errnum)||': ||errtxt||' on '||:system.trigger_item); Message(errtyp||'-'||TO_CHAR(errnum)||': '||errtxt||' on '||:system.trigger_item); end;
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
137
Stored Procedures
q
Procedures stored within the database are valuable for many reasons
Single source of complex update code Security Revision control Reduction of network traffic (client/server) Accessed from multiple divergent clients
138
How D2K calls a stored procedure Calling an Rdb Stored Procedure Example We will not discuss configuration management of stored procedures
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
139
The traditional method for calling a stored procedure from D2K is a simple, in-line call: begin procedure_to_call(); end;
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
140
The first implementation of SQL*Net for Rdb did not include stored procedure support We needed to use stored procedure calls to allow multiple platforms access to the same code Necessity is the mother of invention
Benjamin Franklin
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
141
Forms_DDL
q
Upside
Allows us to make stored procedure calls today Interface is not TOO hokey
Downside
Dynamically compiled and executed on server Numeric and Date parameters must be converted to text, then back to native data types A work-around for this could be to use temporary tables to pass data between client and server Exception handling becomes more complex
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
142
Problem: Capture client messages on the server Problem: Must be able to record events outside of the context of a transaction Answer: Use a stored procedure that does no database work
Short compilation and execution time Outside of transaction contexts Messages are logged on the server and can be culled on a frequent basis
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
143
Exception Reporting
q
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
144
Exception Reporting
q
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
145
Results
q q
We began using this approach in the fall. We now have 10,000 - 15,000 lines of stored procedure code. We are able to write stored procedures that provide a single source for
VMS Developer anything else
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
146
SQL*Net for Rdb version (next) is due out soon and reportedly supports the same native interface for stored procedures as Oracle 7/8
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
147
Additional levels of control are possible and may be required for your application. Things to consider include
timeouts nulls commits rollbacks cursors
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
148
149
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
150
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
152
Prototyping
q
Beyond prototyping
requires defining standards developing ways to handle the particular challenges of your application
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
153
Standards
q
Important
Ease of generating forms can cause chaos. Relying on industry standards minimizes training. Standards increase usability.
Readily implemented
Use Developer features: property classes, object libraries, etc. Use Developer defaults, unless ...
Apply to everything
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
154
Multiform Applications
q
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
155
Configuration Management
q
You need to take the same care that you do with main frame applications. Our project consists of
5 or more developers working with Developer/Forms almost 300 modules
156
Automated Builds
q
157
Data Models at Variance with User Views Access Control Auditing Transaction Control & Locking
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
158
Worse yet, ODBC doesnt tolerate 30 character names. If you are fond of long names, you will need views.
Developer is very easy to use when working with a single table or view.
Sophisticated query options are automatically included. All of the fields that you need are pulled in easily.
Pulling in data from several tables can be done more efficiently with views.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
159
This form lets the user query on fields from the account, consumer, site, and meter tables. The form is based on a view and response is very fast. Updates are not allowed on this form, but the buttons at the bottom lead to forms that do support updates to the underlying tables.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
160
Access Control
q q q
Client
VMS
Requests Access
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
161
Auditing
q q q q q q q
Database triggers Audit table Form on table Changes highlighted Reference information, as required User acceptance Example
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
162
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
163
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
164
Legacy Applications
q
Copying a legacy application can produce torturous results. Most legacy applications do not include Developers event driven nature. Prototyping with a good tool frees you to
try a different approach present it to the user quickly throw it away, if you need to try something else
Adopting an utterly different style can free you and your users to think about what needs to be done. Stepping back and thinking simplistically can produce simply obvious results.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
165
Developer Defaults
q
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
166
Additional Remarks
Deployment
q
Developers
Paradigm shift Group efforts Intoxicating speed Testing an event driven application
Users
Change is threatening User involvement
q q
168
Stored procedures
Fake it.
Legacy applications
Can you write a COBOL application in Developer? Do you want to?!
Manageable Predictable
169
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
170
Questions?
Cheryl P. Jalbert Jeffrey S. Jalbert Keith W. Hare Thomas H. Musson Jeffrey S. Haidet Phone (740)587-0157 Web: www.jcc.com List Server: RdbD2K
To subscribe to the list server:
Send mail to majordomo@JCC.com. Include subscribe RdbD2K in the body of your message.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
171
Questions?
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
172
Questions?
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
173
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.
174