frameworksparadigms

Is there still a difference between a library and an API?


Whenever I ask people about the difference between an API and a library, I get different opinions. Some give this kind of definition, saying that an API is a spec and a library is an implementation...

Some will tell you this type of definition, that an API is a bunch of mapped out functions, and a Library is just the distribution in compiled form.

All this makes me wonder, in a world of web code, frameworks and open-source, is there really a practical difference anymore? Could a library like jQuery or cURL crossover into the definition of an API?

Also, do frameworks cross over into this category at all? Is there part of Rails or Zend that could be more "API-like," or "libraryesque"?

Really looking forward to some enlightening thoughts :)


Solution

  • My view is that when I speak of an API, it means only the parts that are exposed to the programmer. If I speak of a 'library' then I also mean everything that is working "under the hood", though part of the library nevertheless.