0

It’s a bit hard for me to wrap my head around an API that isn’t a web service.

I am sure they exist, because even as I use my phone, I’m sure the developers didn’t need to specify how to use the keyboard to display the letters, they just know they wanted to use it.

So my question is, can someone give an example maybe code example? I can’t wrap my head around how a simple DLL isn’t an API for example.

I don’t follow how to create the interface for applications to communicate when it isn’t a web service type interface. Like two desktop applications communicating with each other, I can’t picture how the construction of them communicating is abstracted away into this API.

Any examples or even a better explanation than the definition would be great. I’ve read so many articles, but nothing that got my head around it.

  • First of all. What's your understanding of "API". Why do you thing DLLs are not (or could not be) APIs? Finally. How web clients and servers communicate each others? What they both rely on? – Laiv Oct 1 at 19:29
  • 2
    This question sounds confused to me. I have absolutely no idea what you mean by "I can’t wrap my head around how like a simple DLL isn’t an API" - DLLs usually have (not are) an API. The term API is far older and far more general than just "web service API". Concerning DLLs (or libraries, DLL is a Windows specific abbreviation): there exist several different technologies how an API to a DLL/library can look like, a full list with explanations would probably way too long to fit here into an answer. – Doc Brown Oct 1 at 19:35
  • Part of the problem is due to folk abbreviating the term "web API" to just "API" and then assuming that the two are synonymous. They are not. Any public items in a library of any sort (eg a dll) form that library's API. – David Arno Oct 2 at 10:07
  • In terms of DLLs, the API isn't the DLL itself. It's the surface of the DLL, the public members that it exposes which constitutes the API. – Yuli Bonner Oct 3 at 2:25
4

API: Application Programming Interface

An API is a set of functions made available for applications to use. Those functions can take many forms, including:

  • Set of pure functions
  • Set of objects and methods on those objects
  • Standard library included with your language
  • Application library published for plugins, etc.
  • Web endpoints that can be called
  • Standardized networking protocols like:
    • AMQP
    • CORBA
    • RPC
    • IMCP
    • SMTP
  • Custom networking protocols where negotiation is application specific

The place where people get crossed is when they have an overly narrow view of the world. More confusion arises because someone writes an article that claims that something that is an API isn't because of some weird semantic.

Bottom line is that applications, languages, operating systems, etc. can all make different functionality available to you through a defined interface. That interface is designed to enable you to make your application or plugin work with the thing that provides the API.

  • Thanks Berin! I think this was the response I was looking for. – MZawg Oct 2 at 10:14
  • @MZawg - the problem is, everybody is talking about Web APIs now, so it's trendy, and the demand for developers is so high that there's bound to be a lot of less experienced people who are familiar with the term and how it's used in the web services/RPC/REST world, but don't fully understand the wider concept. So you get a lot of blogs and discussions that perpetuate misleading information. – Filip Milovanović Oct 2 at 14:48
  • @FilipMilovanović yeah I can understand that. What you described is really why I’m asking the question. I hear it so much described in so many ways that I just simply got lost. – MZawg Oct 2 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.