I've been reading a number of articles on what is an API but they're either too high level or two low level for me... I can't seem to quite grasp the entire concept, or have that sneaking feeling that i'm missing something bigI understand an API exposes functions which help to talk to a more complex backend... i.e. Google API lets you create Google maps on your website, or OpenGL API helps you draw graphics without having to talk directly to your video card driver.And I understand (i think) the concept of an abstract API which provides a kind of guide for developers to build software e.g. a RobotAPI might have functions for MoveForward(Speed), TurnLeft(Degrees) etc and a community of robot builders might all want to use that RobotAPI.But what I don't quite get is the implementation... Lets say there's an application called ComplexApplication and it's written in CSomeone wants to use ComplexApplication and either doesn't have access or can't be bothered learning the source code... and they want to use Python to build PythonApplication. Then someone else has the same issue but they want to use Java to build JavaApplicationI understand (I think) that an API can work as a go between, but it would seem to me that there would need to be two API's: one for the Python developer to use, and one for the Java developer to use. It would seem to me that the API would be provided as a Python module, or a Java Module, and then each programmer can use the API by sending/recieving data to the methods/members defined by that API. Both the Python and Java implementations of the API would share the same abstract API definition... same functions etc... but the code would be different: is that correct? Then however each function talks to the ComplexApplication, is not important... i.e. black box, designed by the ComplexApplication folkI would also assume that in some cases (like Google maps) the API could be flexible.. it seems some API's are just XML or JSON data formats, and it's expected that you can send/receive data using common protocols like HTTP etc?Am I on the right track here? It seems in implementing an API, you would have to either a) built a separate API for each language with (ideally) exactly the same functionality or b) use a common go between protocol which all languages have an existing implementation forFrom what I know about OpenGL (not much), it's a C specific API implementation: there are Java implementations but I believe they just wrap the same C API rather than being something that actually facilitates calls from Java straight to the video card? I just get the feeling there's something about how different programming languages can interact that removes the need for language specific APIs?
Trouble conceptualising API's
programming practices;api;api design