oracle forms : reusable components
TRANSCRIPT
![Page 1: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/1.jpg)
Sharing Objects and Code
http://ebiztechnics.blogspot.com
![Page 2: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/2.jpg)
Objectives
• Describe the various methods for reusing objects and code• Inherit properties from property classes• Group related objects for reuse• Reuse objects from an object library• Reuse PL/SQL code
http://ebiztechnics.blogspot.com
![Page 3: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/3.jpg)
Sharing & Reusing Code
• Increases productivity• Decreases maintenance• Increases modularity• Maintains standards
http://ebiztechnics.blogspot.com
![Page 4: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/4.jpg)
Property Classes
Canvas
properties
Window
propertiesItem
properties
Alert
properties
LOV
properties
http://ebiztechnics.blogspot.com
![Page 5: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/5.jpg)
Inherit Properties
• Set the Subclass Information property.• Convert an inherited property to a variant property.• Convert a variant property to an inherited property.
Inherited Property
Variant Property
http://ebiztechnics.blogspot.com
![Page 6: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/6.jpg)
Object Group
• Is a logical container• Enables you to:
– Group related objects– Copy multiple objects in one operation
http://ebiztechnics.blogspot.com
![Page 7: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/7.jpg)
Using Object Groups
• Blocks include:– Items– Item-level triggers– Block-level triggers– Relations
• Object groups cannot include other object groups• Deleting:
– An object group does not affect the objects– An object affects the object group
http://ebiztechnics.blogspot.com
![Page 8: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/8.jpg)
Subclassing
Ability to make exactcopy of object
Ability to add to object
Abilityto alterproperties
A/C No:
Branch:
Balance:
A/C Type:
Open Date:
A/C No:
Branch:
Balance:
A/C No:
Branch:
Balance:
A/C No:
Branch:
Balance:
http://ebiztechnics.blogspot.com
![Page 9: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/9.jpg)
Copying Objects
Ability to make exactcopy of object
A/C No:
Branch:
Balance:
A/C No:
Branch:
Balance:
http://ebiztechnics.blogspot.com
![Page 10: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/10.jpg)
Inheriting Changes
Ability to Inherit changes
Ability to Inherit changes
Ability to Inherit changes
A/C No:
Branch:
Balance:
A/C Type:
Open Date:
A/C No:
Branch:
Balance:
A/C No:
Branch:
Balance:
A/C No:
Branch:
Balance:
Make changesTo Parent
http://ebiztechnics.blogspot.com
![Page 11: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/11.jpg)
An Object Library
• Is a convenient container of objects for reuse• Simplifies reuse in complex environments• Supports corporate, project, and personal standards• Simplifies the sharing of reusable components• Appear in the Navigator if they are open• Are used with a simple tabbed interface• Are saved to .olb file or to database
http://ebiztechnics.blogspot.com
![Page 12: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/12.jpg)
Advantages of Object Library
• Simplifies the sharing and reuse of objects• Provides control and enforcement of standards• Eliminates the need to maintain multiple referenced forms
http://ebiztechnics.blogspot.com
![Page 13: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/13.jpg)
Smart Class
• Is an object in an object library that is frequently used as a class
• Can be applied easily and rapidly to existing objects
• Can be defined in many object libraries
You can have many Smart Classes of a given object type.
Note: Green check indicatessmart class
http://ebiztechnics.blogspot.com
![Page 14: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/14.jpg)
Working with Smart Classes
1. Select an object in theLayout Editor or Navigator.
2. Click Right Mouse Button, From the pop-up menu,select Smart Classes.
3. Select a class from the list.
http://ebiztechnics.blogspot.com
![Page 15: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/15.jpg)
Reusing PL/SQL
• Triggers:– Copy and paste text– Copy and paste within a module– Copy to or subclass from another module– Move to an object library
• PL/SQL program units:– Copy and paste text– Copy and paste within a module– Copy to or subclass in another module– Create a library module– Move to an object library
http://ebiztechnics.blogspot.com
![Page 16: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/16.jpg)
PL/SQL Libraries
Procedures
Functions
Packages
PL/SQLLibrary
.pll or DatabaseForm Module
Menu ModuleReport ModuleGraphics Module
http://ebiztechnics.blogspot.com
![Page 17: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/17.jpg)
Writing Code for Libraries
• A library is a separate module, holding procedures, functions, and packages.
• Direct references to bind variables are not allowed.• Use subprogram parameters for passing bind variables.• Use functions, where appropriate,
to return values.
http://ebiztechnics.blogspot.com
![Page 18: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/18.jpg)
Creating PL/SQL Library
http://ebiztechnics.blogspot.com
![Page 19: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/19.jpg)
Attaching PL/SQL Library
http://ebiztechnics.blogspot.com
![Page 20: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/20.jpg)
Calling Subprograms
procedure p1( );
...function...
pack1.p2 ( );
Attached Libraries
Database
P1
P2
Calls
http://ebiztechnics.blogspot.com
![Page 21: Oracle Forms : Reusable Components](https://reader034.vdocument.in/reader034/viewer/2022042506/589ca3dc1a28abf4148b65a9/html5/thumbnails/21.jpg)
Summary
• Reasons to share objects and code:– Increased productivity– Increased modularity– Decreased maintenance– Maintaining standards
• Property Class• Object Group• Object Library• PL/SQL Library
http://ebiztechnics.blogspot.com