Application Programming Interface (API)

Click For Summary

Discussion Overview

The discussion centers around the concept of Application Programming Interfaces (APIs), exploring their definitions, uses, and the educational background necessary for understanding them. Participants inquire about practical examples of APIs in use and how they are studied in programming courses.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Homework-related

Main Points Raised

  • One participant defines an API as a set of rules and specifications that allows software programs to interact, comparing it to user interfaces for human-computer interaction.
  • Another participant describes an API as a specified interface to software, mentioning that it typically includes function names and descriptions of their effects.
  • Questions are raised about how to study APIs, including whether they are taught in programming courses and what foundational knowledge is required before learning about them.
  • A later reply suggests that documentation is essential for studying APIs and provides an example of the Java String class API, detailing its constructors and methods.
  • Participants discuss the nature of APIs, with one stating that the API itself serves as the interface, while another clarifies that APIs are not related to graphical user interfaces like clicking icons in an operating system.

Areas of Agreement / Disagreement

Participants express varying levels of understanding about APIs and their educational context. While some agree on the importance of documentation and foundational knowledge, there is no consensus on the specific educational approaches or the nature of APIs as interfaces.

Contextual Notes

Some participants express uncertainty about the relationship between APIs and user interfaces, and there is a lack of clarity on how APIs are integrated into programming education.

Who May Find This Useful

Individuals interested in software development, programming education, and the technical workings of APIs may find this discussion relevant.

jackson6612
Messages
334
Reaction score
1
An is a particular set of rules and specifications that a software program can follow to access and make use of the services and resources provided by another particular software program that implements that API. It serves as an interface between different software programs and facilitates their interaction, similar to the way the user interface facilitates interaction between humans and computers. -- Wikipedia

Hi

I'm a layman but would like to know any two common software programs where one uses the API (whatever it is!) of another programs. Could you please help me to satisfy my curiosity? Thanks a lot.
 
Technology news on Phys.org
An API is exactly what it says... the specified interface to a chunk of software. The bits and pieces in the API are usually function names with associated arguments and some vague description of what the effects of calling that function might be.

I just posted this on another thread:
http://download.oracle.com/javase/1.4.2/docs/api/java/lang/String.html
It's an example of the API for a particular Java Class, "String". It says what that piece of software contains and does.

Usually the name "API" is applied to the interface to some larger application, rather than just a single class. But it all depends on the level at which you are working.
 
Last edited by a moderator:
How do you study these APIs? Are they taught in any programming courses in colleges? What should someone study and learn before beginning to study APIs? What is that interface for APIs? Is it something like a window in the way you find when you open a Windows program by clicking on it?
 
symbolipoint said:
How do you study these APIs? Are they taught in any programming courses in colleges? What should someone study and learn before beginning to study APIs? What is that interface for APIs? Is it something like a window in the way you find when you open a Windows program by clicking on it?
To answer your questions in order -
1) One usually consults the documentation for the API of interest. For example, someone in another thread was trying to write an application using strings in Java. The API for the String class in Java can be found here: http://doc.java.sun.com/DocWeb/api/java.lang.String

The members of this API include a number of constructors that are used to create instances of this class; a number of methods that can be used on a String instance, such as concat(), length(), and others; properties such as isEmpty, which evaluates to true if the string is empty.

2) Programming classes typically show how to use some API for reading data from the keyboard or displaying data to the monitor and other things. When I learned C many years ago, an API we were exposed to early on was the functions declared in stdio.h, a "header" file with declarations of functions that do what I said in the previous sentence. About all you need to know to use an API is how to create an instance of a class (if the API is for a class) or how to include a header file, and then how to call a function by passing the right number of parameters of the right type and storing the returned value.

3) There is no interface for an API. The API is the interface, which tells you what a given library of functions etc. provides.

4) An API is not related to clicking an icon in Windows or other OS.
 
Last edited by a moderator:

Similar threads

  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 9 ·
Replies
9
Views
5K
Replies
2
Views
3K
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
Replies
3
Views
4K