What is the difference between framework and library | Sololearn: Learn to code for FREE!


What is the difference between framework and library


5/1/2021 9:58:06 AM

Abubakar Isa Sharif

3 Answers

New Answer






LIBRARY :- It is just a collection of routines (functional programming) or class definitions(object oriented programming).The reason behind is simply code reuse, i.e. get the code that has already been written by other developers. The classes or routines normally define specific operations in a domain specific area. For example, there are some libraries of mathematics which can let developer just call the function without redo the implementation of how an algorithm works. FRAMEWORK :- In framework, all the control flow is already there, and there are a bunch of predefined white spots(kinda abstract design) that we should fill out with our code. It defines a skeleton where the application defines its own features to fill out the skeleton. In this way, your code will be called by the framework when appropriately. Here, the concentration shld only be on implementing domain specific functions. This is known as Inversion of Control(IoC).