2011-05-10

Framework vs library

My simplistic interpretation of what is framework and what is library.


Framework
Library

Many try to distinguish them by direction of control,  a rather technical distinction:

  1. If it calls you, this is framework.
  2. If you have to call it, this is library.

Another slightly different point of view:

  1. Framework is a skeleton for an application.
  2. Library performs specific tasks for its clients.
So, I'm a fan of second definition. And although first one sounds reasonable too, I have a feeling it may not be entirely correct for all the cases.