P. 1
Breaking Out of the Box Oracle Forms

Breaking Out of the Box Oracle Forms

|Views: 188|Likes:
Published by Diego Ortellado

More info:

Published by: Diego Ortellado on Oct 21, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

01/16/2013

pdf

text

original

Sections

  • Breaking Out of the Box Oracle Developer/Forms for Experienced Rdb Developers
  • Abstract
  • Schedule
  • Assumptions
  • Configurations and Choices
  • Traditional
  • Classic Client/Server
  • Multi-dimensional Client/Server
  • New Ways with Terminals
  • Windows Terminals
  • Thin Clients on the Web
  • Configuration for Some Sessions
  • Background for Your Choices
  • Your Choices
  • Software Pieces and Parts
  • Production Systems Prerequisite Software
  • Other Software Pieces and Parts
  • Design Choices
  • An Example
  • Example Form
  • Another Example Form
  • Integrated from Another Technology
  • Developing Forms -- The Basics & Default Functionality
  • Introduction
  • Open the Forms Builder
  • Open the Form Builder
  • Getting Started
  • What You See First
  • Components: Modules and Blocks
  • Components: Canvases and Windows
  • Your Tools: Tools Menu
  • Your Tools: Object Navigator
  • Your Tools: Properties Palette
  • Your Tools: Layout Editor
  • Examining the Object Navigator
  • Closeup of the Object Navigator
  • Close-up of the Property Palette
  • Close-up of the Layout Editor
  • Your Tools
  • Using the Object Navigator to Add a Block
  • Using the Wizards
  • Creating a Block Based on a Table
  • Form for Choosing the Table
  • Connecting to the Database
  • Browsing the Metadata
  • Rdb Specifics for Browsing the Metadata
  • Selecting Your Table or View
  • Selecting Your Columns
  • Choosing the Layout Wizard
  • Beginning the Layout Wizard
  • Choosing the Canvas
  • Setting Up the Block
  • More Wizardly Choices
  • Choosing Your Layout Style
  • Other Choices
  • Finishing the Layout Wizard
  • The Layout Wizard and Frames
  • Examining the Results
  • Changing the Defaults
  • Free-Hand in the Layout Editor
  • Menus for the Layout Editor
  • For Example: Alignment
  • Alignment
  • For Example: Fonts
  • Fonts
  • Changing the Form with the Properties Palette
  • Examining the Properties for a Column
  • Using the Property Palette to Change the Layout
  • Changing Multiple Things at Once
  • Editing Prompts
  • Changing Other Defaults
  • The Layout Editor Toolbar
  • Adding Other Text
  • Adding Color
  • Rearranged Form
  • Follow Naming Standards
  • Other Naming Issues
  • Window Size
  • Determining Navigation Order
  • Special Considerations for Rdb
  • Changes to Accommodate Rdb
  • Required Changes for Rdb with Some Product Versions
  • Module Level Changes for Rdb
  • Item Level Changes
  • Module Level Changes in the Property Palette
  • Block Level Changes in the Property Palette
  • Item Level Changes in the Property Palette
  • You, Developer 2000/Forms, & Rdb
  • A User View
  • Default Menus and Toolbar
  • Querying
  • Help
  • Printing
  • Summary
  • Standards and Inheritance
  • Component Software
  • Building Blocks for Software Development
  • Standards: Property Classes Defined
  • Example of a Property Class (Dates)
  • Visual Attributes
  • Program Units
  • Menus and Toolbars
  • Property Class Module
  • Object Library Definition
  • Benefits of Object Libraries
  • Property Class Module vs. Object Libraries
  • Developer Templates
  • When to Use Inheritance Structures
  • Graphical View of Inheritance Structures
  • Developer Intermediate Topics
  • Advanced Topics
  • Additional Topics
  • Exceptions
  • Developer Exceptions
  • How Does Developer/Forms Let You Know An Exception Has Occurred?
  • How Can You Handle Expected Exceptions?
  • On-Message Trigger
  • :System.Message_level
  • On-Error Trigger
  • Stored Procedures
  • What We Will Discuss
  • How D2K Calls A Stored Procedure
  • Calling An Rdb Stored Procedure
  • Forms_DDL
  • Example - Exception Reporting Routine
  • Results
  • Now The Good News
  • Transaction Control & Locking
  • Aside on How the Transaction Model Changed
  • Additional Brief Topics
  • Some of the Topics to Consider
  • Prototyping
  • Standards
  • Multiform Applications
  • Configuration Management
  • Automated Builds
  • Other Issues and Answers
  • New Appreciation for Views
  • Access Control
  • Auditing
  • Audit Form Example
  • Where Do YOU Start?
  • Legacy Applications
  • Developer Defaults
  • Additional Remarks
  • Deployment
  • Rdb Specific Issues
  • Possible Additional Advantages to YOU, the Experienced Rdb User

Breaking Out of the Box Oracle Developer/Forms for Experienced Rdb Developers

Cheryl P. Jalbert
Thomas H. Musson • Jeffrey S. Haidet Keith W. Hare • Jeffrey S. Jalbert

JCC Consulting, Inc. Granville OH 43023

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.

2

Schedule
q

EOUG: Hints and Kinks
– 8:30 - 9:15 – Designed for those who know Developer or who know Rdb – Collection of topics

q

Rdb Forum: Breaking Out of the Box
– – – – – – 13:00 - 15:15 Designed for people with Rdb experience Quick introduction to Developer/Forms Specifics of using Developer with Rdb Additional advanced topics Discussion of the value that you can expect from using Developer/Forms with Rdb

q q

Rdb Forum: Discussion / Q & A
– 15:15 - 16:00

Rdb Forum: Demos ?
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.

3

Time is an important factor.Assumptions q q q q q You have one or more existing Rdb databases. 4 . You need a quick success. Confidential and proprietary to JCC Consulting. Inc.. 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. JCC Consulting. Inc. You lack a satisfactory GUI (Graphical User Interface). Does this sound familiar? Copyright 1998. All rights reserved. Your existing UI took time to create and takes time to enhance.

All rights reserved. 5 .Configurations and Choices q Configurations – – – – – – – Traditional Classic Client/Server Multi-dimensional Client/Server New Ways with Terminals Windows Terminals Thin Clients on the Web Other q q Software Pieces and Parts Design Choices Copyright 1998. Inc.. JCC Consulting. Confidential and proprietary to JCC Consulting. Inc.

All rights reserved.. JCC Consulting. 6 .Traditional Remember “main frames” and terminals? Copyright 1998. Inc. Inc. Confidential and proprietary to JCC Consulting.

Inc.. The server provides the database. JCC Consulting.Classic Client/Server The client provides the user interface. All rights reserved. Confidential and proprietary to JCC Consulting. 7 . Inc. Copyright 1998.

All rights reserved. Confidential and proprietary to JCC Consulting. Inc. Production DB Server Training DB Server File & Print Server for Remote Office Mapping Application Server for Remote Office Clients Copyright 1998. JCC Consulting. Inc. 8 ..Multi-dimensional Client/Server A client relies on a server to provide a resource.

Confidential and proprietary to JCC Consulting. Inc. 9 . All rights reserved. Copyright 1998.. JCC Consulting.New Ways with Terminals How well do you “remember” terminals? You can produce forms for terminals & PCs from the same development project. Inc.

Inc. JCC Consulting. All rights reserved. Confidential and proprietary to JCC Consulting. 10 ..Windows Terminals New wrinkle on an old scheme that centralizes management Copyright 1998. Inc.

. Inc. JCC Consulting.Thin Clients on the Web Copyright 1998. All rights reserved. Confidential and proprietary to JCC Consulting. Inc. 11 .

All rights reserved. Confidential and proprietary to JCC Consulting.Configuration for Some Sessions DB Server Map Server Client Copyright 1998. Inc. 12 .. Inc. JCC Consulting.

Inc. 13 . JCC Consulting. Inc.Background for Your Choices q q What are your requirements? What are your resources? Copyright 1998.. All rights reserved. Confidential and proprietary to JCC Consulting.

All rights reserved. – You may have a set of terminals in place. Copyright 1998. 14 . Inc. Confidential and proprietary to JCC Consulting. JCC Consulting. Inc. – Terminals provide centralized management. – You can develop forms that use the same code for windows or dumb terminals on VAXes.“Dumb Terminals” as Your Choice q Advantages – You can use Oracle Developer with terminals. – Oracle Developer compares well with other forms packages for dumb terminals..

. – Developing for dumb terminals is much more tedious. Inc. JCC Consulting. – Dumb terminals lack “real estate. You will be stuck with Version 1. All rights reserved.” – 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.“Dumb Terminals” as Your Choice q Disadvantages – Oracle has shown no interest in keeping terminal support current. Inc. 15 .3.2 for your work with terminals. Confidential and proprietary to JCC Consulting.

Confidential and proprietary to JCC Consulting. Inc. Components that can be integrated are “hot” items. – Fewer and fewer people need to be taught the basics of how to use the application that you develop. – Prototyping a form for user review is quick and easy. All rights reserved.Windowing Devices q Advantages – Newer technology q q Oracle development is ongoing. – 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.. 16 . Inc. JCC Consulting.

17 .Windowing Devices q Disadvantages – Costs may be higher q q because you have terminals in place because you have PC’s in place and can’t control the maintenance costs You may need to disable mouse navigation for heads down data entry. All rights reserved. Inc. Inc. Confidential and proprietary to JCC Consulting. – Your application may be better suited to terminal styles q Copyright 1998. JCC Consulting..

All rights reserved. Inc. Logic Applicatn. JCC Consulting. 18 . Confidential and proprietary to JCC Consulting..Client/Server Choices — Five Tier Model Client Server User Interface Interfc. Logic Data Logic Data Thin Client Thick Client Copyright 1998. Inc.

Can maximize reusable components. Use the database to ensure consistent results. Use the database to audit. Copyright 1998. Can minimize network traffic. JCC Consulting. Inc. Inc. q Thick Clients – – – – – – – Use the database to address access issues.. 19 . Confidential and proprietary to JCC Consulting. All rights reserved.Your Choices q Thin Clients – WEB – Can minimize network traffic. Can reduce systems work. Can enhance standardization. – Can reduce systems work (by ignoring the systems work for the client).

JCC Consulting.0 – Reports V6.Translating Oracle’s New Names q Oracle Developer 2000 V2.0 – Reports V3. Oracle Developer V6.0 – Graphics V6.0 – Graphics V3. Confidential and proprietary to JCC Consulting. it’s Oracle Developer (without the 2000). Inc.x – Forms V5. 20 . All rights reserved.0 is out. Inc.. – Forms V6.0 q q Now.0 Copyright 1998.

6) q Data Transport Mechanism – SQLNet (Preferred) – ODBC (Required for earlier versions or non-Oracle db.2. Inc. Inc. JCC Consulting.) q Operating Systems – VMS – NT – W95 Copyright 1998.Software Pieces and Parts q Database – Oracle 7 or 8 – Rdb (Use Version 7.7.0 is out.10.) q User Interface – Developer Forms (Version 5.1.6. All rights reserved.3. Confidential and proprietary to JCC Consulting. Forms V4.5.0. 21 ..) – For VMS terminals (Developer V1.0 or higher to use SQL*net.

TCP/IP] − Operating System Network [e. Inc.g. JCC Consulting.g. − q 22 . e. Inc. Confidential and proprietary to JCC Consulting..g. W ‘95 or W/NT] On Server − Network Software. All rights reserved. (This is installed with SQL Services if not already present on system.) − Rdb V7.q Production Systems Prerequisite Software On Client Developer − SQL*net − SQL*net network adapter [e.0 Copyright 1998. UCX/DECnet − Native Connect (Part of SQL Services) − SQL*net.

Inc. Confidential and proprietary to JCC Consulting..Other Software Pieces and Parts q q q q q q q q Other data stores Other clients Other operating systems ActiveX controls Batch processing eXcel and such Icon editors Documentation support Copyright 1998. Inc. JCC Consulting. All rights reserved. 23 .

Inc. JCC Consulting.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.. Inc. All rights reserved. Confidential and proprietary to JCC Consulting. q Styles of presentation – – – – – – 24 .

Inc. 25 .. Confidential and proprietary to JCC Consulting. All rights reserved.An Example Copyright 1998. Inc. JCC Consulting.

. All rights reserved. 26 . Confidential and proprietary to JCC Consulting.Example Form Notice the Menus & the Toolbar & the special buttons at the bottom for audit or notes or other things. Inc. Copyright 1998. JCC Consulting. Inc.

Another Example Form Data is erased here for non-disclosure reasons. Confidential and proprietary to JCC Consulting. Inc. . The dark blue background is a clue to the user that this isn’t part of the query area. Inc. 27 Copyright 1998. All rights reserved. JCC Consulting..

Copyright 1998. Confidential and proprietary to JCC Consulting... All rights reserved. but the thing of interest to you is this button. Inc. JCC Consulting.… and Another Form . Inc. Several things are obscured here to avoid revealing company confidential data.. 28 .

Inc. All rights reserved. Inc.. JCC Consulting.Integrated from Another Technology Copyright 1998. Confidential and proprietary to JCC Consulting. 29 .

Developing Forms -The Basics & Default Functionality Getting Started Developing Forms .

31 . JCC Consulting. All rights reserved. Inc. Inc.. Confidential and proprietary to JCC Consulting.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.

All rights reserved. Confidential and proprietary to JCC Consulting. Inc. JCC Consulting.. 32 . Inc.Open the Forms Builder Copyright 1998.

. Confidential and proprietary to JCC Consulting. 33 . JCC Consulting.Open the Form Builder Copyright 1998. Inc. All rights reserved. Inc.

first. q Click OK. JCC Consulting.) Copyright 1998. Inc. Confidential and proprietary to JCC Consulting.Getting Started q Examine the new front piece provided by Oracle. at some of the tools that you will use. q Choose a starting point. (We will choose “Build a new form manually” in order to look. – – – – Use the Data Block Wizard OR Open an existing form OR Build a form based on a template OR Build a new form manually. All rights reserved. – Use the wizards. 34 . – Use the Help provided. Inc..

Confidential and proprietary to JCC Consulting. Inc.. JCC Consulting.What You See First (if you choose Build a new form manually) Copyright 1998. Inc. 35 . All rights reserved.

. Inc. Confidential and proprietary to JCC Consulting. JCC Consulting. All rights reserved. Canvas. Inc. Copyright 1998. 36 . Window We’ll discuss these topics in this section.Module. Block.

) q 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. (if you have the compile before running option checked. Inc. Confidential and proprietary to JCC Consulting. 37 . All rights reserved. when generated or run..Components: Modules and Blocks q Module – Forms file – FMB extension – Generates an FMX extension. Inc. JCC Consulting.

JCC Consulting. One or more canvases per module. – User’s view of what you’ve created. programmatically.Components: Canvases and Windows q Canvas – – – – Display surface for blocks (in frames) and text. Inc. 38 . q Window – View of a canvas or many canvases. Each block must be assigned to a canvas. All rights reserved.. also. – Windows can be re-sized and moved by the user and. Inc. Confidential and proprietary to JCC Consulting. Copyright 1998. A canvas can include many blocks.

. Confidential and proprietary to JCC Consulting. All rights reserved. Inc. 39 . Inc. JCC Consulting.Your Tools: Tools Menu Copyright 1998.

Confidential and proprietary to JCC Consulting. 40 . All rights reserved.Your Tools: Object Navigator Copyright 1998. Inc. Inc. JCC Consulting..

Inc. All rights reserved.. 41 . JCC Consulting. Confidential and proprietary to JCC Consulting.Your Tools: Properties Palette Copyright 1998. Inc.

Your Tools: Layout Editor Copyright 1998. Inc. Confidential and proprietary to JCC Consulting.. JCC Consulting. 42 . Inc. All rights reserved.

– Where graphics and text is added. – Not all characteristics will be of interest for all objects. – Easy place to add buttons and extra fields. Inc.Developer’s Primary Tools q Object Navigator – Lists each different type of object and the objects in that type for each module that is open for development work. JCC Consulting. All rights reserved. Copyright 1998. q Layout Editor – Editor for the form presentation. – Main work space – Details can be expanded or contracted on the display q Property Palette – Easy way to change the characteristics of objects.. 43 . Confidential and proprietary to JCC Consulting. Inc.

All rights reserved. Inc. 44 . Confidential and proprietary to JCC Consulting.. Inc. JCC Consulting.The Developer’s Tools in an Example Copyright 1998.

Examining the Object Navigator The boxes on the left enable you to see more or less detail in the navigator. Inc. Inc. Confidential and proprietary to JCC Consulting.. JCC Consulting. These have the following meaning: q Expanded q Unexpanded (but something to expand q Nothing to expand Copyright 1998. All rights reserved. 45 .

Confidential and proprietary to JCC Consulting. Inc. JCC Consulting. All rights reserved. we see q three data blocks q two canvases q two windows There are also some q triggers q attached libraries q LoVs q property classes q record groups Copyright 1998.. 46 .Closeup of the Object Navigator In this module. Inc.

Inc. 47 .. Inc. Confidential and proprietary to JCC Consulting. All rights reserved. Copyright 1998. JCC Consulting.Close-up of the Property Palette We see that the payment canvas q is displayed q is displayed in the payment_window q is 505 X 149 Some characteristics are not set at all.

Close-up of the Layout Editor The layout editor supports arrangement of the canvas.. Inc. The canvas is shown selected. Inc. All rights reserved. q This layout shows some of the styles chosen for the application used as an example q q the title decorative frame (blue rectangle) q q buttons colors q q alignment fonts q q The tools for changing things are on the left side. Confidential and proprietary to JCC Consulting. JCC Consulting. Copyright 1998. 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

Using the Object Navigator to Add a Block

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

Using the Wizards
This form will pop-up, when you add a block.

Recommendation: Use the Data Block Wizard.
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.

51

All rights reserved. Confidential and proprietary to JCC Consulting. Inc.. 52 . JCC Consulting. Inc.Creating a Block Based on a Table Copyright 1998.

Confidential and proprietary to JCC Consulting. 53 . JCC Consulting. Inc. Inc. Copyright 1998.Form for Choosing the Table q Press Browse… to see the list of tables and views q Or type in the name. All rights reserved..

Copyright 1998. 54 . The Connect form will pop up automatically. All rights reserved.Connecting to the Database The first time that you try to read from the database (whether you are reading data or metadata). Confidential and proprietary to JCC Consulting. you will need to connect to the database. JCC Consulting. Fill it in appropriately. Inc. Inc..

Inc. Inc. you will next see this form. Copyright 1998.Browsing the Metadata If you’ve asked to browse for a table. Confidential and proprietary to JCC Consulting.. JCC Consulting. All rights reserved. 55 .

you need to make certain that you get everyone’s tables. as well as “Current user”. Confidential and proprietary to JCC Consulting. Copyright 1998. In the Rdb context. 56 .Rdb Specifics for Browsing the Metadata q Select “Other users”. if you need those. therefore.. too. JCC Consulting. The “Current user” default assumes that you only want to see the sub-schema built for you. – Heads up: If any of your tables use a table or column name of over 30 characters (or. over 29 characters) you will want to create a view that uses shorter names and use the view with Developer 2000. q Select “Views”. Inc. in some cases. All rights reserved. Inc. – Oracle’s “other database” includes a concept of subschemas.

Copyright 1998. Inc. 57 . All rights reserved. Or Scroll to the table that you want. Inc. JCC Consulting.Selecting Your Table or View q q q Use the Find window to search for your table. Use the % as a wild card in the Find window.. Confidential and proprietary to JCC Consulting.

(You will not have to display it.. Inc. All rights reserved. JCC Consulting.Selecting Your Columns Select columns by q Selecting them in the available list and dragging them to the Database Items list q Or Selecting each and pressing > q Or Pressing >> to move them all. Confidential and proprietary to JCC Consulting. Include the key.) Copyright 1998. Inc. 58 .

Confidential and proprietary to JCC Consulting. Inc.Choosing the Layout Wizard Copyright 1998. Inc. 59 . All rights reserved.. JCC Consulting.

All rights reserved. Confidential and proprietary to JCC Consulting. Inc. JCC Consulting. 60 . Inc.Beginning the Layout Wizard Copyright 1998..

Confidential and proprietary to JCC Consulting. Copyright 1998. Inc. Inc. All rights reserved. JCC Consulting.Choosing the Canvas q q Create a new canvas Or use any canvas in this module. 61 ..

Copyright 1998. Inc. Inc.Setting Up the Block q Display all of the columns that you included in the block. All rights reserved.. q Or leave some of them out. Confidential and proprietary to JCC Consulting. 62 . JCC Consulting.

Copyright 1998. JCC Consulting. Confidential and proprietary to JCC Consulting. here. 63 . Inc. Inc.More Wizardly Choices Default choices work well.. All rights reserved.

All rights reserved. Inc. Tabular layout style arranges columns horizontally and works well with multiple rows. 64 .Choosing Your Layout Style q q Form layout style arranges columns vertically. Inc.. JCC Consulting. Copyright 1998. Confidential and proprietary to JCC Consulting.

(You can leave it blank. JCC Consulting. the other two fields should be left as the defaults.) If you use 1 as the number of Records Displayed. All rights reserved. Inc. Inc. 65 .. Copyright 1998.Other Choices q q The Frame Title (block title) is displayed above the display of the fields. Confidential and proprietary to JCC Consulting.

Finishing the Layout Wizard Copyright 1998. JCC Consulting. Confidential and proprietary to JCC Consulting. All rights reserved.. Inc. Inc. 66 .

Inc. Copyright 1998.0 Layout Wizard. – If your fields “spontaneously” rearrange themselves!. A large number of fields or any fields with a large number of characters may cause difficulties. All rights reserved.. 67 .The Layout Wizard and Frames q Frames – Display container for a block – Displayed on a canvas – Find it as an item under block in the Object Navigator q Issues – With the V2. JCC Consulting. it is because the frame property Update_layout is set to automatically (instead of manually) in the Property Palette. you may need to adjust the dimensions of the frame after you receive exception messages from the Wizard. Inc. Confidential and proprietary to JCC Consulting.

Inc. All rights reserved. Inc.Examining the Results Copyright 1998. 68 .. Confidential and proprietary to JCC Consulting. JCC Consulting.

Changing the Defaults There are several ways to change the default result. All rights reserved. Inc. JCC Consulting.. Confidential and proprietary to JCC Consulting. Inc. 69 . q q q q q 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.

Inc. Copyright 1998. For example. q Add text. 70 .Free-Hand in the Layout Editor You can select and change things directly in the layout editor. All rights reserved. Confidential and proprietary to JCC Consulting. q Add a rectangular frame. q Click on the canvas and drag it to re-size it. q Select all of the fields and labels and move them.. JCC Consulting. q Add a button or other feature. q Line up individual items. Inc.

All rights reserved. q Arrange – Align – Group q Format – Font Copyright 1998. 71 . Inc. Confidential and proprietary to JCC Consulting.Menus for the Layout Editor The Menus for your development screen are context sensitive.. Inc. Investigate which menu items are available with the Layout Editor. JCC Consulting. For example.

For Example: Alignment

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

For Example: Fonts
If you q select all of the name fields q choose Format, Font

Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.

74

Confidential and proprietary to JCC Consulting.Fonts You can make all the usual font changes. Inc. JCC Consulting. All rights reserved.. Inc. 75 . Copyright 1998.

All rights reserved. Confidential and proprietary to JCC Consulting. Inc.Changing the Form with the Properties Palette Changes that you can make in the layout with the properties palette include: q q q q Rearranging the column layouts Changing labels Changing fonts Changing query criteria Copyright 1998.. Inc. 76 . JCC Consulting.

All rights reserved. 77 . JCC Consulting. Inc.Examining the Properties for a Column Copyright 1998. Confidential and proprietary to JCC Consulting.. Inc.

Inc. JCC Consulting. Arrange other fields relative to this one. Inc. Confidential and proprietary to JCC Consulting.Using the Property Palette to Change the Layout q q Check on the position and size of a field that you would like to use as a starting point. Copyright 1998. All rights reserved. 78 ..

79 . Here. All rights reserved. Inc. the several lines of the address are selected. Confidential and proprietary to JCC Consulting. you will want to change multiple fields at once.. JCC Consulting.Changing Multiple Things at Once Sometimes. Inc. The “****” for prompt shows that the fields selected have different values for this property. Copyright 1998.

Inc. Copyright 1998. Confidential and proprietary to JCC Consulting.Editing Prompts When you edit a prompt and then press return. JCC Consulting. All rights reserved. Inc.. you will get this pop-up. 80 . You can then edit further.

Inc. JCC Consulting.. 81 . All rights reserved. Copyright 1998. Confidential and proprietary to JCC Consulting. one of the things that you may want to change is the NO default for Case Insensitive Query. Inc.Changing Other Defaults For text fields.

JCC Consulting. Copyright 1998. Confidential and proprietary to JCC Consulting. Inc. All rights reserved.The Layout Editor Toolbar The Layout Editor Toolbar offers shortcuts to change the defaults. Inc.. 82 .

Confidential and proprietary to JCC Consulting. Inc. or edit. (Double click to add. Inc. JCC Consulting.Adding Other Text Use the Text button to add text.) Copyright 1998. 83 . All rights reserved.. several text items.

Inc. 84 . Confidential and proprietary to JCC Consulting. Inc. JCC Consulting.. All rights reserved.Adding Color Color for q Fill q Line q Text Copyright 1998.

Confidential and proprietary to JCC Consulting. All rights reserved. 85 . Inc.Rearranged Form View of the form in the layout editor. Inc. There are visible and invisible changes to make yet. Copyright 1998.. JCC Consulting.

Copyright 1998. Inc.Follow Naming Standards Type here and press enter to rename here and here. Confidential and proprietary to JCC Consulting. 86 .. Inc. JCC Consulting. All rights reserved.

Inc. q q When you change the window name. All rights reserved. Confidential and proprietary to JCC Consulting. Inc.Other Naming Issues Notice window name. 87 . Copyright 1998. Expect this same flexibility in other name changes.. JCC Consulting. Developer 2000 does not lose the association between the window and the canvases displayed in the window.

All rights reserved. JCC Consulting. 88 . Copyright 1998. Confidential and proprietary to JCC Consulting. Inc. Inc.Window Size Changing the window size to fit the canvas is optional..

. JCC Consulting. q Drag and drop so that first_name is the first field.Determining Navigation Order Use the Object Navigator to determine the order in which the fields are visited. Inc. Inc. Copyright 1998. All rights reserved. q Etc. Confidential and proprietary to JCC Consulting. 89 .

Special Considerations for Rdb
q

q

q

q

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

Changes to Accommodate Rdb
The property palette defaults are not correct for Rdb for: q Pre-Version 7 of Rdb
– Pre-Version 5 of Forms – When using ODBC
q

In some additional cases for best performance

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

Required Changes for Rdb with Some Product Versions
q

Module
– Savepoint Mode = False (Default is True in earlier versions. Property is not shown in Forms 5.)

q

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.)

q

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

Oracle Rdb does not. All rights reserved. which is also – Oracle Forms prior to Release 5. JCC Consulting. Inc. if you are using – Developer/2000 prior to Release 2.0. Inc. 93 . Confidential and proprietary to JCC Consulting.. Set the module’s Savepoint = FALSE.Module Level Changes for Rdb q q q Oracle7 supports savepoints for sub-transactions.0 Copyright 1998.

– Oracle Rdb requires key mode updatable or non-updatable. “Primary Key”) – Oracle 7 uses internally generated synthetic keys. 94 .. – Oracle Rdb relies on DBA defined primary keys. Inc. q Key Mode – Oracle 7 uses key mode unique for the system generated keys. Confidential and proprietary to JCC Consulting. set the block property Enforce primary key = Yes. All rights reserved. – JCC uses non-updatable for Rdb. (Continued) Copyright 1998. Inc. JCC Consulting. – For Rdb.Block Level Changes These still apply: q Enforce Primary Key (formerly.

use locking mode = delayed. Inc. Inc. which takes the lock when the user saves. which takes an exclusive lock as soon as the user starts typing.. 95 . JCC Consulting. – For concurrency. All rights reserved. Copyright 1998. D2000 uses locking mode immediate. Both locking modes re-read and compare.Block Level Changes This one only applies if you are using products pre-V7 of Rdb: q Locking Mode – By default. Confidential and proprietary to JCC Consulting.

– Set Query length to usual length plus one. Confidential and proprietary to JCC Consulting. 96 .Item Level Changes q This still applies: For attributes that are part of the key – Set Primary key = Yes – To enforce the primary key.. JCC Consulting. Inc. Inc.” Copyright 1998. – ODBC needs a character for the “null terminators. Developer 2000 must “know” what the key is. All rights reserved. q If using ODBC: for all items – Set Maximum length to usual length plus one.

All rights reserved. Inc. JCC Consulting. 97 ..Module Level Changes in the Property Palette q Savepoint Mode = False Notice that there is NO illustration of this for Forms 5 & Developer 2000 V2. Confidential and proprietary to JCC Consulting. Inc. Copyright 1998.

Confidential and proprietary to JCC Consulting. All rights reserved.) Locking Mode = Delayed (Default is Automatic. JCC Consulting. Inc.) Copyright 1998.) Key Mode = Nonupdatable (Default is Automatic..Block Level Changes in the Property Palette q q q Enforce Primary Key = Yes (Default is No. Values of “Automatic” work without changes. 98 . Inc.

Copyright 1998. Inc.Item Level Changes in the Property Palette q q Primary Key = Yes..) Maximum Length and Query Length must be one character longer than in the database. 99 . Inc. for one or more items (Default is No. if using ODBC. All rights reserved. JCC Consulting. Confidential and proprietary to JCC Consulting.

& Rdb q q q Improvements in the software have made the Rdb connection more transparent. There is still value in defining table keys. Inc.. 100 . All rights reserved. Developer 2000/Forms. Copyright 1998. Inc. There is still value in understanding the issues. Confidential and proprietary to JCC Consulting. JCC Consulting.You.

. All rights reserved. Inc..A User View To understand how to use Developer 2000. JCC Consulting. … Provides a form for connecting to the database.. Confidential and proprietary to JCC Consulting. Copyright 1998. 101 . Inc. you must understand what your application user will see from the choices that you make. Developer 2000 provides significant functionality by default. More . q Pulls in metadata q Establishes defaults for – – – – – q q labels item characteristics spacing canvases windows.

Default Menus and Toolbar q q Pull-down menus Toolbar q More . JCC Consulting.. All rights reserved. Copyright 1998.. Confidential and proprietary to JCC Consulting. 102 . Inc.. Inc.

JCC Consulting. Inc.. 103 . All rights reserved. Confidential and proprietary to JCC Consulting. > Query retrieval by groups of rows Copyright 1998. Inc.Querying q q q q Enter Query Execute Query Count Hits Cancel Specifying the query criteria: q Any subset of the fields available q Exact matches q Wildcarding q <.

. All rights reserved. Confidential and proprietary to JCC Consulting. Copyright 1998. 104 . JCC Consulting.Help Choosing Help on the default Help menu displays the property palette information on the item selected. Inc. Inc.

Copyright 1998. All rights reserved. 105 .“Hot Keys” Choosing Keys on the Help menu displays this form. JCC Consulting.. Notice q F1 is Help q F7 is Enter Query q F8 is Execute Query q You can scroll for more. Inc. Confidential and proprietary to JCC Consulting. Inc.

printing in landscape mode is usually best.Printing q q Since many forms are wider than tall. All rights reserved. Inc. Copyright 1998. Inc.. D2000 defaults to portrait. Confidential and proprietary to JCC Consulting. JCC Consulting. If you use this feature well. it seems like a “free” report. 106 .

Pull-down menus. Copyright 1998. Inc.. Toolbar. Printing. Inc. JCC Consulting. Querying. Hot Keys. More … q Forms is an excellent tool for prototyping or JAD (Joint Application Development). Forms does some things by default.Summary q q Forms is a powerful multiplier of your work. 107 . Confidential and proprietary to JCC Consulting. Connecting to the database. All rights reserved. – – – – – – – – – Help for you with the metadata. Help.

108 .Standards and Inheritance This section introduces how an application developer can use modern software engineer techniques from within an Oracle Developer application. Inc. All rights reserved. q q q q q q Property classes (domains) Visual Attributes Program Units Object Libraries Property Classes vs. JCC Consulting. Inc.. Confidential and proprietary to JCC Consulting. Object Libraries Templates Copyright 1998.

All rights reserved. 109 . Inc. Inc.Component Software q Baby Steps – Create generic functionality – Gradually refine functionality as needed for applications – Maintenance made easier Application Refine Level 2 Level 1 Level 1 Level 2 Level 1 Refine Copyright 1998. Confidential and proprietary to JCC Consulting. JCC Consulting..

. Inc. Maintainable Application Copyright 1998. JCC Consulting. All rights reserved. Inc. Confidential and proprietary to JCC Consulting.Building Blocks for Software Development Standards (Property Classes) Interface (Visual Attributes) Logic (Program Units) Easy to Use. 110 .

Confidential and proprietary to JCC Consulting. Inc. JCC Consulting.. 111 Examples: Copyright 1998. All rights reserved..Standards: Property Classes Defined q A property class is a first generation Developer 2000 building block for application development. Inc. – 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 .. .

Inc. Inc. JCC Consulting. 112 .. Confidential and proprietary to JCC Consulting. All rights reserved.Example of a Property Class (Dates) q Format Masking – – – – MM/DD/YYYY MM/DD/YYYY HH:MI:SS DD-MON-YYYY etc q q Handling the NULL date (17-NOV-1858) Date Range Searches Copyright 1998.

font. Confidential and proprietary to JCC Consulting.Visual Attributes q q q Color. All rights reserved. 113 . Inc. Inc. Copyright 1998. JCC Consulting.. 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.

.Program Units q q 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: – – – – JCC’s GET_ID functionality Override Developer’s default assembly of the query Population of default values when creating a new record Etc. Inc. 114 . Confidential and proprietary to JCC Consulting. Inc. JCC Consulting. All rights reserved. Copyright 1998.

115 ..Menus and Toolbars Oracle Developer supports the creation of MDI menus and toolbars – Menus and Toolbars once created can be referenced and included by every form – Dynamically enable and disable functionality during runtime – Reference form specific code via Developer built-in DO_KEY q The DO_KEY statement causes the corresponding form events to fire – This ensures that the event code path can be called and executed the same way each time – Requires less code maintenance by creating/developing/debugging once – Example: DO_KEY ( ‘EXECUTE_QUERY’ ). All rights reserved. – Statement will fire the “KEY” trigger which triggers the Query events Copyright 1998. Inc. Confidential and proprietary to JCC Consulting. Inc. JCC Consulting.

Inc. Inc.x release JCC recommends: q Create a separate module for property classes q Copy the property classes from this module to other form modules. JCC Consulting. as a subclass q Ensure all form modules reference the same property class module Enforces a single point of code maintenance (software building block) Copyright 1998. All rights reserved. 116 .. Confidential and proprietary to JCC Consulting.Property Class Module If using a pre-Developer 2.

117 . JCC Consulting. Inc.Object Library Definition q q 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. Inc. Confidential and proprietary to JCC Consulting. All rights reserved. q q 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. Confidential and proprietary to JCC Consulting. All rights reserved.. 118 . Inc.Benefits of Object Libraries q Object Libraries are opened automatically when you start the Forms Designer – Makes objects immediately accessible q Multiple Object libraries may be associated with a form – – – – One for company standards One for work group standards One for personal standards A single object can reference only one entry in a particular Object Library so Object Libraries cannot be in conflict with one another. Inc. q Do not need to drag and drop all objects into your active form to make objects available Copyright 1998.

. Confidential and proprietary to JCC Consulting. Items.0 q 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. Inc.Property Class Module vs. Object Libraries q Property Classes – Can contain property classes. Toolbars. Windows. JCC Consulting. All rights reserved.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. 119 . – The Object Library opens automatically when the Forms Designer is opened making objects immediately available. Visual Attributes. Program Units. Inc. Canvases. – New feature in Developer 2000 Release 2. but not all items in pre-Developer 2.0 that truly implements inheritance (linked during compilation) Copyright 1998. etc.

q Templates are a great way of getting through the “muck”. Inc. It is not a true inheritance structure but can utilize inheritance structures like items from the Object Library.. 120 . Inc. JCC Consulting. All rights reserved. Copyright 1998. Templates may include (either referenced or nonreferenced): – – – – – Toolbars Program Units Canvases Attached Libraries Etc.Developer Templates q q A template is a starting form that you use to build other forms. Confidential and proprietary to JCC Consulting.

menus. JCC Consulting. etc. All rights reserved. Copyright 1998. Inc.. Confidential and proprietary to JCC Consulting. 121 . 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. Inc.When to Use Inheritance Structures q Property Classes – These structures store property settings for forms. toolbars. blocks and items q q Templates – This structure provides a starting point for form creation q Use Property Classes whenever possible for similar items q Object Libraries – This structure is a common storage location for all generic items.

All rights reserved. Form Specific Items Form Specific Functions Etc. Copyright 1998.Graphical View of Inheritance Structures Appication Form Object Library Property Classes Toolbars Menus Attached Libraries Etc. JCC Consulting. Classes Referenced Toolbars Referenced Menus Referenced Attached Lib. Inc. Confidential and proprietary to JCC Consulting. Referenced Prop. Inc.. References 122 .

.Summary q q 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. Confidential and proprietary to JCC Consulting. All rights reserved. 123 . JCC has found standards and functionality easier to develop. JCC Consulting. Inc. maintain and implement. Inc. Copyright 1998.

. JCC Consulting.Developer Intermediate Topics Developer features that you will want to explore include: q Master-detail relationships q List of Values (LoV) q Special item types – Flags – Icon buttons q q q q q q Radio buttons Stacked canvases Alert boxes PL/SQL Triggers (forms triggers) Creating your own toolbar or menus Copyright 1998. All rights reserved. Inc. Confidential and proprietary to JCC Consulting. 124 . Inc.

Advanced Topics Teaching the Application to Sing .

Additional Topics q q q Exception Handling Stored Procedures Elaboration of morning topics – Transaction control & locking – Others Copyright 1998. Inc. Inc. 126 . Confidential and proprietary to JCC Consulting. All rights reserved.. JCC Consulting.

Exceptions q Unexpected or abnormal result of an operation – – – – – Divide by zero Invalid data type conversion Data entered does not match format mask No rows returned by a query “No changes to save” q Exceptions can be raised by: – SQL – PL/SQL – Calls to user-named subprograms Copyright 1998. JCC Consulting. Inc. All rights reserved.. Inc. Confidential and proprietary to JCC Consulting. 127 .

20. Confidential and proprietary to JCC Consulting.see the PL/SQL User’s Guide and Reference for a complete list q Each exception has a severity level associated with it – Valid levels are 0. 10.. Inc. JCC Consulting. 128 . 5. 25 – 0 is least severe – 25 is most severe Copyright 1998.Developer Exceptions q Oracle has several pre-defined. All rights reserved. named exceptions – – – – – CURSOR_ALREADY_OPEN DUP_VAL_ON_INDEX INVALID_CURSOR PROGRAM_ERROR etc . Inc. 15.

2 end. then “higher-level” begin-end block.. JCC Consulting. Inc.g.How Does Developer/Forms Let You Know An Exception Has Occurred? q Default exception handling in Forms is to display a message – Validation exceptions also disallow forward progress – More severe exceptions can cause a “rollback” q Exceptions are first raised in the begin-end block where the exception occurs. Begin begin begin <exception occurs> end. All rights reserved. Confidential and proprietary to JCC Consulting. 3 Copyright 1998. 1 end. Inc. etc. 129 . – E.

130 . Copyright 1998. JCC Consulting. Inc. Inc. Confidential and proprietary to JCC Consulting.How Can You Handle Expected Exceptions? q 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. All rights reserved..

Message_level – This system variable represents what severity level of messages should be suppressed by the default exception reporting Copyright 1998. Inc. All rights reserved. Confidential and proprietary to JCC Consulting. JCC Consulting. 131 .How Can You Filter “Noise” Exceptions? q What is a “noise” exception? – Any exception that D2K raises that you do not care about . Inc.in our case: q q “n records saved” “No records to save” q On-Message trigger – Create a trigger at the form level that filters messages you do not care about q :System..

This is that stupid "Transaction complete: XXX records applied and saved" message.ERROR_TYPE ** Trigger: On-Message */ DECLARE errnum NUMBER := ERROR_CODE. Inc. ELSE /* ** Print the Normal Message that would have appeared */ Message(errtyp||’-’||TO_CHAR(errnum)||’: ’||errtxt||’ on ’||:system.ERROR_TEXT. END IF. JCC Consulting.This is that stupid "No changes to apply" message. All rights reserved. Copyright 1998. Confidential and proprietary to JCC Consulting. Inc.trigger_item). Null. ELSIF errnum = 40405 and errtyp = ’FRM’ THEN -. Null. errtxt VARCHAR2(80) := ERROR_TEXT.On-Message Trigger q On-Message /* Built-in: ERROR_CODE. end. Null.. 132 . BEGIN IF errnum = 40400 and errtyp = ’FRM’ THEN -. ELSIF errnum = 0 THEN -.This is that stupid non-message ("-0:") message. errtyp VARCHAR2(3) := ERROR_TYPE.

message_level := save_message_level.Ignore 0. Inc.Message_level q declare save_message_level char(2). only reporting to the user is suppressed. 10 select x into :block. You should use this one carefully! Copyright 1998. :system.. begin save_message_level := :system. All rights reserved. 5.message_level. -. Inc. end. Confidential and proprietary to JCC Consulting. q q 133 .:System.message_level := ‘10’.item from y where z = 2. Note: Exceptions are still raised. :system. JCC Consulting.

JCC Consulting. 134 .” o o o – Any questions? Copyright 1998.Recording Client Exceptions q Why record exceptions? – User: “I just got an error. Inc. All rights reserved.. Confidential and proprietary to JCC Consulting. Inc.” IS: “What was the error?” User: “It said something about converting…” IS: “What? What screen are you on?” User: “Screen X” IS “What were you doing?’ User “Trying to open a new account.

Inc. JCC Consulting.. All rights reserved. Confidential and proprietary to JCC Consulting. 135 . Inc.Recording Client Exceptions q q q q 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.

record_exception – This is a library (COMC) procedure which calls a database stored procedure. Inc. All rights reserved.Recording Client Exceptions q Comc. – The database stored procedure writes information to a log file. Confidential and proprietary to JCC Consulting. Inc.. JCC Consulting. aptly named “Stored Procedures” q On-Error trigger – Create a trigger at the form level that logs exceptions Copyright 1998. 136 . q This will be described in more detail in the next section.

trigger_item).trigger_item). Message(errtyp||'-'||TO_CHAR(errnum)||': '||errtxt||' on '||:system. Confidential and proprietary to JCC Consulting.ERROR_TEXT. end. errtyp VARCHAR2(3) := ERROR_TYPE. Inc. Copyright 1998.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.form_event. */ comc.record_exception(comc. 137 . Inc. errtxt VARCHAR2(80) := ERROR_TEXT.’Property class ’||errtyp||’-’||TO_CHAR(errnum)||': ’ ||errtxt||' on '||:system. ** ** Print the Normal Message that would have appeared.On-Error Trigger q On-Error /* ** Built-in: ERROR_CODE.. All rights reserved. BEGIN /* ** Log the message are where it occurred. JCC Consulting.

Confidential and proprietary to JCC Consulting. however. Inc. All rights reserved.. JCC Consulting. meet the SQL standards) – Configuration management !?!? Copyright 1998. Inc.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 q They also have a down side – No return values (no native interface for D2K to return values) – Rdb stored procedures have poor exception handling/reporting (it does. 138 .

Inc. Inc. Confidential and proprietary to JCC Consulting. JCC Consulting. All rights reserved. 139 ..What We Will Discuss q q q q How D2K calls a stored procedure Calling an Rdb Stored Procedure Example We will not discuss configuration management of stored procedures… Copyright 1998.

140 . q Works for Oracle 7/8 procedure/data sources Copyright 1998. Confidential and proprietary to JCC Consulting. Inc. in-line call: begin procedure_to_call(). All rights reserved.How D2K Calls A Stored Procedure q The traditional method for calling a stored procedure from D2K is a simple. Inc. JCC Consulting. end..

Confidential and proprietary to JCC Consulting. Inc. – DDL means Data Definition Language Copyright 1998. All rights reserved. JCC Consulting. 141 .. Inc.Calling An Rdb Stored Procedure q q q 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 q Use Forms_DDL calls – Forms_DDL(‘procedure_to_call()’).

. 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. Confidential and proprietary to JCC Consulting. JCC Consulting. All rights reserved. Inc.Forms_DDL q Upside – Allows us to make stored procedure calls today – Interface is not TOO hokey q Downside – Dynamically compiled and executed on server – Numeric and Date parameters must be converted to text. 142 . Inc.

143 . JCC Consulting. Inc. All rights reserved. Confidential and proprietary to JCC Consulting.Example . Inc..Exception Reporting Routine q q q 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.

Confidential and proprietary to JCC Consulting. Inc.current_datetime’) || ’’’)’).Exception Reporting q Client side Forms_DDL(’call comc_record_event(’’’ || name_in(’system. All rights reserved.current_form’) || ’~’ || event_text || ’~’ || name_in(’system. Inc. 144 . Copyright 1998.. JCC Consulting.

JCC Consulting. All rights reserved.. Inc.Exception Reporting q Server Side trace trim(:text_string) || ’~’ || trim(session_user) || ’~’ || cast(cast(current_timestamp as timestamp(2)) as char(22)). 145 . Copyright 1998. Confidential and proprietary to JCC Consulting. Inc.

000 . We are able to write stored procedures that provide a single source for – VMS – Developer – anything else Copyright 1998.. All rights reserved. We now have 10. Confidential and proprietary to JCC Consulting.15. 146 . Inc. JCC Consulting.Results q q q We began using this approach in the fall. Inc.000 lines of stored procedure code.

Confidential and proprietary to JCC Consulting.Now The Good News q 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. 147 . Inc. JCC Consulting.. Inc. All rights reserved.

Things to consider include – – – – – timeouts nulls commits rollbacks cursors Copyright 1998. Confidential and proprietary to JCC Consulting. Inc. All rights reserved. 148 . q Additional levels of control are possible and may be required for your application..Transaction Control & Locking q Developer uses Read Write transactions – Implication « lock conflict q SQL services for Rdb can be configured for Read Committed – Index locks remain until the scan has completed. Inc. JCC Consulting.

. Inc.JCC’s Latest Move on Transaction Control q For each new instance of a form – rollback the existing R/O transaction – start a new R/O transaction – use the WHEN_NEW_FORM_INSTANCE forms trigger q For a database write – rollback the existing R/O transaction – start a R/W transaction – use the PRE_COMMIT forms trigger q For the commit – commit the R/W transaction with the POST_DATABASE_COMMIT forms trigger – start a R/O transaction with the POST_FORMS_COMMIT forms trigger Copyright 1998. All rights reserved. Confidential and proprietary to JCC Consulting. 149 . JCC Consulting. Inc.

All rights reserved.. Copyright 1998. JCC Consulting. Confidential and proprietary to JCC Consulting. Inc. Action to change the entire model – – – – one developer well over 200 forms modules 5 minutes by adding the forms triggers to the property class in the object library.Aside on How the Transaction Model Changed q q Standardization is the key. 150 . Inc.

Additional Brief Topics Slides from the morning presentation .

All rights reserved. 152 . Inc. JCC Consulting.. Confidential and proprietary to JCC Consulting.Some of the Topics to Consider q q q q q Prototyping Standards Multiform Applications Configuration Management Automated Builds Copyright 1998. Inc.

Inc. Inc. JCC Consulting. 153 . is robust – prototyping of individual forms can be the basis of what you will use in production q Beyond prototyping – requires defining standards – developing ways to handle the particular challenges of your application Copyright 1998.Prototyping q With windows and Developer – – – – prototyping is easy most of the default decisions that are built-in are useful your own standards are also quickly added with domains support for JAD (Joint Application Development) projects. Confidential and proprietary to JCC Consulting. or other ways of involving users.. All rights reserved.

– Standards increase usability. unless .. – Relying on industry standards minimizes training.. q Readily implemented – Use Developer features: property classes. object libraries. 154 . All rights reserved. JCC Consulting.Standards q Important – Ease of generating forms can cause chaos. Confidential and proprietary to JCC Consulting. Inc. q Goal of the prototyping explorations – Sloppy prototyping leads to chaos – Lack of early user involvement leads to chaos – Good prototyping leads to coherent standards q Apply to everything Copyright 1998. Inc. etc. – Use Developer defaults..

All rights reserved. JCC Consulting. Inc.Multiform Applications q Applications with one form module – Frequently used for examples – Frequently used for small applications – Some shops use multiple single form applications q Advantages of multiform applications – – – – – Partition development Support logical application flow Enhance flexibility Can share information across forms Amortize database “connect” Copyright 1998. 155 . Inc. Confidential and proprietary to JCC Consulting..

. JCC Consulting. All rights reserved. Our project consists of – 5 or more developers working with Developer/Forms – almost 300 modules q We use MicroSoft’s Visual Source Safe – to provide a library of all the modules q q q q forms icons DLL’s common libraries – to ensure that we aren’t all working at cross purposes Copyright 1998. 156 .Configuration Management q q You need to take the same care that you do with main frame applications. Inc. Confidential and proprietary to JCC Consulting. Inc.

All rights reserved. Confidential and proprietary to JCC Consulting..Automated Builds q Batch-mode builds require – Oracle command line method – No programmatic alterations of the forms – For each form q q q attach to the database compile the form unattach q Automated builds with the Forms API – – – – Single program control Mass changes without opening each form by hand One database attach Requires less than 20% of the time that batch mode requires in the best of circumstances Copyright 1998. JCC Consulting. Inc. Inc. 157 .

Confidential and proprietary to JCC Consulting.. Inc. 158 . JCC Consulting.Other Issues and Answers q q q q Data Models at Variance with User Views Access Control Auditing Transaction Control & Locking Copyright 1998. All rights reserved. Inc.

q q Worse yet. – Developer doesn’t tolerate 31 character names. – Sophisticated query options are automatically included. Inc. Copyright 1998. 159 . Confidential and proprietary to JCC Consulting. All rights reserved. q Pulling in data from several tables can be done more efficiently with views. If you are fond of long names.New Appreciation for Views q Requirements may suggest views. you will need views. q Developer is very easy to use when working with a single table or view. ODBC doesn’t tolerate 30 character names. – Your users may think of a subset of the data that is inconsistent with database tables or normalization. – All of the fields that you need are pulled in easily. – Interfacing with legacy applications may require views. Inc. JCC Consulting..

Inc.. 160 .This form lets the user query on fields from the account. Updates are not allowed on this form. consumer. but the buttons at the bottom lead to forms that do support updates to the underlying tables. and meter tables. Confidential and proprietary to JCC Consulting. The form is based on a view and response is very fast. site. Copyright 1998. JCC Consulting. Inc. All rights reserved.

Inc. All rights reserved.. Inc. JCC Consulting. 161 . Confidential and proprietary to JCC Consulting.Access Control q q q Views “Roles” 3 SQL Services levels Process started under some VMS account SQL Service Rdb Database Client VMS Requests Access Authenticates as a VMS user (Session User) Authorized to use this service (System User) DBA grants access via ACLs Copyright 1998.

Auditing q q q q q q q Database triggers Audit table Form on table Changes highlighted Reference information. Confidential and proprietary to JCC Consulting. Inc. Inc. 162 . as required User acceptance Example Copyright 1998. JCC Consulting.. All rights reserved.

Confidential and proprietary to JCC Consulting.. Inc.Audit Form Example Copyright 1998. Inc. 163 . JCC Consulting. All rights reserved.

164 . Confidential and proprietary to JCC Consulting. JCC Consulting. Inc.. All rights reserved. Inc.Where Do YOU Start? q q q Legacy application Developer defaults Other? Copyright 1998.

if you need to try something else q q Adopting an utterly different style can free you and your users to think about what needs to be done. JCC Consulting. Inc. Stepping back and thinking simplistically can produce simply obvious results. 165 . Inc. All rights reserved.. Copyright 1998. Prototyping with a good tool frees you to – try a different approach – present it to the user quickly – throw it away. Confidential and proprietary to JCC Consulting.Legacy Applications q q q Copying a legacy application can produce torturous results. Most legacy applications do not include Developer’s event driven nature.

.Developer Defaults q Advantages of built-in defaults – Provides a starting point – Many are well chosen q Disadvantages of built-in defaults – Have changed between releases – May not meet your needs q Building your own defaults – Use the standardization tools – Avoid unnecessary changes from q q Oracle Developer standards Industry standards Copyright 1998. JCC Consulting. Inc. Confidential and proprietary to JCC Consulting. All rights reserved. Inc. 166 .

Additional Remarks What? We don’t have four more days! .

Confidential and proprietary to JCC Consulting. 168 ..Deployment q Developers – – – – Paradigm shift Group efforts Intoxicating speed Testing an event driven application q Users – Change is threatening – User involvement q q Can help Requires a training period – Side-step competition with legacy applications – Include humor Copyright 1998. Inc. JCC Consulting. All rights reserved. Inc.

Rdb Specific Issues
q

The original set
– The differences are dwindling. – You can use Developer features to apply certain characteristics uniformly and meet the needs.

q

Stored procedures
– Fake it.

q

Legacy applications
– Can you write a COBOL application in Developer? – Do you want to?!

q

Do we — those of us with Rdb — demand more?
– Big – Fast – Mission critical – Accurate
Copyright 1998, JCC Consulting, Inc., All rights reserved. Confidential and proprietary to JCC Consulting, Inc.

– Manageable – Predictable
169

Possible Additional Advantages to YOU, the Experienced Rdb User
q

You can learn how to embrace PC technology.
– Disadvantage: You aren’t “in Kansas” any more and the Wicked Witch is unpredictable.

q

The vendor is the same as your database vendor.
– This has meant on-going improvements in the way the two work together.

q

Developer can be a significant step toward flexibility and independence.

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.

cheryl@jcc.com jeff@jcc.com keith@jcc.com tom@jcc.com jeffh@jcc.com

171

Inc. Confidential and proprietary to JCC Consulting.Questions? Copyright 1998. JCC Consulting. All rights reserved. Inc. 172 ..

All rights reserved. Inc. 173 .Questions? Copyright 1998. JCC Consulting.. Confidential and proprietary to JCC Consulting. Inc.

Inc. Confidential and proprietary to JCC Consulting. 174 .Copyright 1998. JCC Consulting.. All rights reserved. Inc.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->