DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: api

  1. #1
    Join Date
    Jan 2002
    Posts
    111
    Hi,
    Can any one tell me what is API is all about where it is used.How it is used.please let me know the links for more information.It will be a great Help
    Thanks
    murali

  2. #2
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,684
    An API is an acronym for Application Programming Interface. The idea is that you build a layer of procedures that perform all your processing, removing the need for developers to know all low level tasks.

    Example: A ordering system needs to add orders consisting of order lines. The customer placing the order must be validated.

    Solution one - Within the ASP, or JSP, code we can perform the the following actions:

    1) Validate the customer who has placed the order.
    2) Insert the order record into the database.
    3) Insert multiple order lines into the database.
    4) Commit the transaction.

    The client developer must know the structure of the database and is responsible for making sure all steps are performed correctly.

    Solution two - The above processing is coded in a packaged procedure called ORDERS in the database. Now the client developer simply needs to call the procedure ORDERS.ADD with the relevant parameters. Changes in the order processing does not require changes in the client code.

    If you don't want to use stored procedures you could always encapsulate your business logic in the middle tier which would still simplify the general client development by abstracting the developers from the low-level processing.

    Most Oracle development books will talk about APIs to a greater of lesser extent.

    Cheers
    Tim...
    OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
    OCA PL/SQL Developer
    Oracle ACE Director
    My website: oracle-base.com
    My blog: oracle-base.com/blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width