Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Oracle Forms : Reusable Components

861 views

Published on

Oracle Forms :Reusable Components

Published in: Software
  • Be the first to comment

  • Be the first to like this

Oracle Forms : Reusable Components

  1. 1. Sharing Objects and Code http://ebiztechnics.blogspot.com
  2. 2. 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
  3. 3. Sharing & Reusing Code • Increases productivity • Decreases maintenance • Increases modularity • Maintains standards http://ebiztechnics.blogspot.com
  4. 4. Property Classes Canvas properties Window properties Item properties Alert properties LOV properties http://ebiztechnics.blogspot.com
  5. 5. 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
  6. 6. Object Group • Is a logical container • Enables you to: – Group related objects – Copy multiple objects in one operation http://ebiztechnics.blogspot.com
  7. 7. 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
  8. 8. Subclassing Ability to make exact copy of object Ability to add to object Ability to alter properties 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
  9. 9. Copying Objects Ability to make exact copy of object A/C No: Branch: Balance: A/C No: Branch: Balance: http://ebiztechnics.blogspot.com
  10. 10. 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 changes To Parent http://ebiztechnics.blogspot.com
  11. 11. 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
  12. 12. 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
  13. 13. 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 indicates smart class http://ebiztechnics.blogspot.com
  14. 14. Working with Smart Classes 1. Select an object in the Layout 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
  15. 15. 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
  16. 16. PL/SQL Libraries Procedures Functions Packages PL/SQL Library .pll or DatabaseForm Module Menu Module Report Module Graphics Module http://ebiztechnics.blogspot.com
  17. 17. 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
  18. 18. Creating PL/SQL Library http://ebiztechnics.blogspot.com
  19. 19. Attaching PL/SQL Library http://ebiztechnics.blogspot.com
  20. 20. Calling Subprograms procedure p1( ); ...function... pack1.p2 ( ); Attached Libraries Database P1 P2 Calls http://ebiztechnics.blogspot.com
  21. 21. 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

×