So I was wondering what the difference between a framework and a library was.
I know that Jquery is a library and I know that React is a framework.
React is under the section “Frontend Libraries” in the curriculum and so is jquery but some people refer to it as a framework.
Can you give me the definitions and differences of the two?
Thanks!
This is a great article written about the difference between the two:
"The technical difference between a framework and library lies in a term called inversion of control.
“When you use a library, you are in charge of the flow of the application. You are choosing when and where to call the library. When you use a framework, the framework is in charge of the flow. It provides some places for you to plug in your code, but it calls the code you plugged in as needed.”
Thanks for the info.
I understand the difference now.
Difference between a framework and library
A code library is used to solve a specific problem or add a specific feature to your program. A framework , on the other hand, provides you with something far more generic and reusable.
The key difference between a library and a framework is “Inversion of Control”. When you call a method from a library, you are in control. But with a framework, the control is inverted: the framework calls you. A library is just a collection of class definitions.