Hi!
I wanted to know in simple language what is an API (application program interface).
I have made an address book program so can I call it an API.
Help will be highly appreciated.
I have made an address book program so can I call it an API.
but,I have found this but it still doesnt clear my doubt
the asking program uses a set of standardized requests, called application programming interfaces (API), that have been defined for the program being called upon. Almost every application depends on the APIs of the underlying operating system to perform such basic functions as accessing the file system. In essence, a program's API defines the proper way for a developer to request services from that program.
Does this mean that if i use methods like nextToken() from StringTokenizer,or I can call my class an API as someone can use it in his program.
IT depends on if your program has something to offer for others. An API offers an abstraction for some low-level tasks while doing some higher level tasks. Let me give you an example of address book itself (since your program dela with it) An address book has contacts which can be created, edited and deleted. Further more it is also supposed to offer functionality such as searching of a contact. Now if you write a collection of classes that provide this basic functionality like say you store contact's using a List and implement the create, edit, delete and search functions. Meaning you provide the most general address book operations through your classes so that developers, using your library, might be able to implement an AddressBook feature without worrying about the details of create, edit and delete (they just call your functions) then you might be able to say that you have provided an API for an AddressBook.
Now deciding whether your program is an API or not is pretty straight forward.
Last edited by verruckt24; Dec 15th, 2008 at 10:49 am.
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Previous Thread in Java Forum Timeline:Please help