Multiple choice technology architecture

Identify the difference between a library and framework

  1. Library will have a default behaviour whereas frameworks will not have a default behaviour

  2. Library can be extended easily whereas extending framework is complex and resource consuming

  3. Library code, in general, is not allowed to be modified

  4. The program's flow of control is dictated by the framework

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The fundamental difference between libraries and frameworks is inversion of control (IoC). In a framework, the framework calls your code and dictates the overall flow (D is correct). With a library, your code calls the library functions when needed. Options A and B are incorrect - both can have default behaviors and extensibility varies. Option C is also incorrect - library code can sometimes be modified depending on the license.