3 ms·
Framework: it calls you. Library: you call it.
by techiferous 15y ago
Framework: it calls you.
Library: you call it.
- jcapote 15y agoWell put.
- biot 15y agoBenjiSmith puts it similarly in a comment halfway down: A library is something *contained* within my code. A framework is a *container* for my application.
- Retric 15y agoThat distinction only has meaning when passing functions around is hard. Nobody call simple chart generating library's frameworks even if they have large numbers of call backs to your code. At the same time it's easy to find actual web frameworks that are instantiated by your code which may spawn unrelated processes at the same time.
- St-Clock 15y agoI commented on that elsewhere. It's more like a continuum. Many libraries will offer callbacks and some are just based around callbacks. Some frameworks need to be called too. For example, IoC frameworks in Java often needs to be called/initialized/configured first (and then they do their magic).
- forinti 15y agoFrameworks adhere to the Greyhound principle: Leave the driving to us. And to the Hollywood principle: Don't call us, we'll call you.
- bitwize 15y agoSomeone once wanted to know what inversion of control was. I told them that inversion of control simply meant in Soviet Russia, API calls YOU!