Click to See Complete Forum and Search --> : api
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
TimHall
07-25-2002, 04:15 AM
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