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:
- Is it required to differentiate between js framework and js library?
- What is the difference between a framework and a library?
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?
-
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.Steve– Steve02/05/2025 12:19:19Commented Feb 5 at 12:19
-
yeah, I havent heard it phrased that way before. your second link seems like a better answerEwan– Ewan02/05/2025 12:42:59Commented 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).Doc Brown– Doc Brown02/05/2025 13:39:10Commented Feb 5 at 13:39
1 Answer 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"
-
I'm not going through all the references to find out if one of them has the same idea, they probably do thoughEwan– Ewan02/05/2025 12:55:00Commented Feb 5 at 12:55
-
1That 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.Doc Brown– Doc Brown02/05/2025 13:40:59Commented Feb 5 at 13:40
-
-
@DocBrown etymology research rarely results in discovering the very first usage. It usually only turns up the oldest known usage.candied_orange– candied_orange02/05/2025 14:33:58Commented 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.Ewan– Ewan02/05/2025 14:35:39Commented Feb 5 at 14:35