Browse Prior Art Database

Minimizing Required Arguments Using Application Programming Interface Caching Mechanism

IP.com Disclosure Number: IPCOM000120271D
Original Publication Date: 1997-Nov-01
Included in the Prior Art Database: 2005-Apr-02
Document File: 2 page(s) / 35K

Publishing Venue

IBM

Related People

Malcolm, JW: AUTHOR

Abstract

Many times, an Application Programming Interface (API) will need a large number of parameters to be passed by the caller in order to determine the specific action that is being requested and the data needed for this action. The complexity of an API caused by requiring a large number of parameters increases the chances of errors on the part of the caller, either by omitting, misunderstanding, or having typos in the parameters.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 92% of the total text.

Minimizing Required Arguments Using Application Programming Interface
Caching Mechanism

      Many times, an Application Programming Interface (API) will
need a large number of parameters to be passed by the caller in order
to determine the specific action that is being requested and the data
needed for this action.  The complexity of an API caused by requiring
a large number of parameters increases the chances of errors on the
part of the caller, either by omitting, misunderstanding, or having
typos in the parameters.

      The situation may exist where the API's execution environment
may have previously been set up such that some of the data required
for the current API already exists in the API's environment from
previous API calls.  The solution is to replace these redundant
parameters with  a small number of parameters that indicate to the
API that it should use  the stored parameters from its current
environment for this API instead  of expecting them to be passed on
the call.  In one embodiment, a different, reduced-parameter API for
the same function could be provided  as an alternative.  If the
earlier calls had been made, the 'short version' API would be called.
Otherwise, the original could be called.  In another possibly
embodiment, the same API could be used, but  a flag parameter could
indicate whether to use stored data or data passed  on the API.  For
the stored data option, the remaining parameters could  pass null
values.  This would...