3

The distinction between "library" and "framework" is said to be that you call a library but a framework calls you. "Hollywood principle" and "inversion of control" are two fancy ways to describe this differentiating quality of framework type software.

Here are some sources from nearby:

What is the origin of this distinction? Who first defined "library" and "framework" this way? What writing should I cite if I wanted to highlight this distinction?

Philip Kendall
26k10 gold badges66 silver badges68 bronze badges
asked Feb 5 at 11:40
3
  • I wouldn't say the distinction is particularly scientific in the first place, or that the words were specially coined by anybody, it simply draws on the metaphor of a library as a place containing books or materials on many particular topics, whereas a framework tends to provide overall support or organisation for many particular things. Commented Feb 5 at 12:19
  • yeah, I havent heard it phrased that way before. your second link seems like a better answer Commented Feb 5 at 12:42
  • I have no canonical sources at hand, but I bet the term "library" predates the term "framework" over several years (if not decades). Libraries are a simpler concept which are surely older than the OOP concept. Software frameworks, however, are usually seen as an OOP concept. Hence, I guess the term framework was made exactly for the distinction you asked for, and the origins for this kind of description are exactly the origins of the term "framework" itself (in the sense of OOP software framework). Commented Feb 5 at 13:39

1 Answer 1

1

Your second link contains an answer that links to this 2006 blog : http://www.ddj.com/blog/architectblog/archives/2006/07/frameworks_vs_l.html

Which in turn links to the 1988 paper "Designing Reusable Classes"

One important characteristic of a framework is that the methods defined by the user to tailor the framework will often be called from within the framework itself, rather than from the user's application code. The framework often plays the role of the main program in coordinating and sequencing application activity. This inversion of control gives frameworks the power to serve as extensible skeletons. The methods supplied by the user tailor the generic algorithms defined in the framework for a particular application.

Emphasis mine, which seems to embody the gist of "Frameworks call your code"

answered Feb 5 at 12:49
6
  • I'm not going through all the references to find out if one of them has the same idea, they probably do though Commented Feb 5 at 12:55
  • 1
    That 1988 does not look as a canonical source to me, it cites a lot of other earlier sources of which one could be the origin. Commented Feb 5 at 13:40
  • yes, or some other non referenced source. Commented Feb 5 at 14:02
  • @DocBrown etymology research rarely results in discovering the very first usage. It usually only turns up the oldest known usage. Commented Feb 5 at 14:33
  • If we take the OP's question as "What writing should I cite if I wanted to highlight this distinction?" then I think this paper would be a reasonable thing to cite. Commented Feb 5 at 14:35

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.