While many factors have contributed to increase in application of Machine Learning to solve complex business problems, one prominent reason is that it’s becoming easier for developer community to apply it, thanks to open source frameworks.
For people who are not familiar with this technology, chances of getting confused about some of the terms used, such as “framework” and “library,” are quite high. So, this article aims to help you ascertain the difference between these two keywords:
Framework is a vague term because even those who regularly use it can’t unanimously agree on its exact definition. However, in most cases, “framework” refers to a bunch of programs, libraries and languages you have built to use in application development. One can think of framework as a base for getting started to build an application.
Library is a collection of objects or methods that your application uses. When a re-usable code needs to shared by many applications, you don’t have to write the same code repeatedly. Instead, you can create a file consisting of this re-usable code, termed as library and link your application to the library to save time and effort.
Another key difference between a library and a framework is “inversion of control (IoC)”. According to Wikipedia, inversion of control is a design principle in which custom-written portions of a computer program receive the flow of control from a generic framework. So, when you call a method from a library, you are in control. But with a framework, the control is inverted: The framework calls you.
Still confused? Check out this helpful YouTube video about the difference between a framework and a library: