Take the 2-minute tour ×

Possible Duplicate:
Library vs. framework vs API?

I am having hard times understanding what these concepts really mean. This software stack thing is very confusing. Can you please help me with this question, or if you can refer me to some article/book where I can learn in details about this software stack and how they interact together. I tried wikipedia but there is not enough explanations there and the confusion still exists.

share|improve this question
Related: Library vs. framework vs API?. Keeto this is an exact duplicate of what you are asking, with the only difference being "runtime systems". Read the answers to the other question and revise your question to tell us exactly how they don't answer your own question, or if they do, then revise your question to be only about "runtime systems". In any case, it would be preferable to tell us what exactly is confusing you in the Wikipedia articles you've read. –  Yannis Rizos Feb 25 '12 at 1:23
add comment

marked as duplicate by Yannis Rizos Feb 25 '12 at 4:08


1 Answer

Most of these terms have become very ambiguous.

"Library" is the simplest. It's just some utility code that resides on your computer, designed to be used by applications or other libraries. It could be a standard library that came with the compiler/interpreter, or it could be a third-party library. Some "pure" libraries are written only in the user's language, but libraries may contain DLLs, SOs, or other native code components.

"API" is sometimes used to refer to plain old libraries, minus the implementation. OpenGL is an API, while Mesa is a library which implements the OpenGL API. It is often, though not always, used to describe specifications of routines which, when called, must communicate with some external environment. That external environment could be the kernel ISRs (in the case of system calls) or the internet (for web APIs), or locally running services, etc.

"Framework" is a very broad term. It can refer to a plain library, as in the "Java Collections Framework". It is more often used to refer to libraries which impose some structure on applications which use them, such as MVC frameworks (Rails, Zend Engine). It can also refer to the architecture of a large modular application, like Eclipse or Drupal. Finally, it can be used to refer to an entire execution environment, as in ".NET Framework" which includes the CLR and the class library.

"Runtime system" is typically used to refer to an interpreter or virtual machine architecture. For native compilers, it can also be used to refer to a runtime library which provides built-in functions. (I don't know why "runtime library" is so named; they are usually linked statically.)

There's also "SDK" and "platform"... but I don't want this to grow into a book!

share|improve this answer
add comment
