oracle application 11i

    Coding With Handlers


    Posts : 109
    Join date : 2007-12-02
    Age : 32
    Location : Clover Infotech

    Coding With Handlers

    Post  shrikantgarud on Sun Jan 27, 2008 8:31 am

    Oracle Applications uses groups of packaged procedures, called
    handlers, to organize PL/SQL code in forms so that it is easier to
    develop, maintain, and debug.
    In Oracle Forms, code is placed in triggers, which execute the code
    when that trigger event occurs. Implementing complex logic may
    require scattering its code across multiple triggers. Because code in
    triggers is not located in one place, it cannot be written or reviewed
    comprehensively, making development, maintenance, and debugging
    more difficult. To determine what code and events affect a particular
    item, a developer must scan many triggers throughout the form. Code
    that affects multiple items can be extremely difficult to trace.
    To centralize the code so it is easier to develop, maintain, and debug,
    place the code in packaged procedures and call those procedures from
    the triggers. Pass the name of the trigger as an argument for the
    procedure to process. This scheme allows the code for a single
    business rule to be associated with multiple trigger points, but to reside
    in a single location.
    There are different kinds of procedures for the different kinds of code
    you write: item handlers, event handlers, table handlers, and business
    rules. Code resides in these procedures; do not put any code in the
    triggers other than calls to the procedures.
    Handlers may reside in program units in the form itself, in form
    libraries, or in stored packages in the database as appropriate.

    Item Handlers

    An item handler is a PL/SQL procedure that encapsulates all of the
    code that acts upon an item. Most of the validation, defaulting, and
    behavior logic for an item is typically in an item handler.

    Event Handlers

    An event handler is a PL/SQL procedure that encapsulates all of the
    code that acts upon an event. Usually event handlers exist to satisfy
    requirements of either Oracle Forms or the Oracle Applications User
    Interface Standards for Forms–Based Products, as opposed to particular
    business requirements for a product.

    Table Handlers

    A table handler encapsulates all of the code that manages interactions
    between a block and its base table. When an updatable block is based
    on a view, you must supply procedures to manage the insert, update,
    lock and delete. Referential integrity checks often require additional
    procedures. Table handlers may reside on either the forms server or
    the database, depending on their size and the amount of interaction
    with the database, but they typically reside in the database.

      Current date/time is Fri Jun 22, 2018 10:34 am