The Difference Between a Framework and a Library

A question that has been asked by many IT professionals

Developers often use the terms “library” and “framework” interchangeably. But there is a difference….! Both Frameworks and libraries are code written by someone else that is used to help solve common problems.

By the definitions:

Framework:

In computer programming , a software framework is an abstract or concrete framework under which software providing generic functionality can be selectively changed by additional user-written code, thus providing application-specific software. It provides a standard way to build and deploy applications and is a universal, reusable that provides particular functionality as part of a larger software program to facilitate the development of application, products and solutions.

Library:

library is simply a collection of codes some functions or some like DOM (Document object Model) all these such things are being packed together and is being used over and over that’s basically is your library.

Confuse ? Here is a clear understanding

By the definitions it is easy to understand both things but to make it more simple you need to understand both things side by side. Actually Library and framework both are dependent on the rules one is your Home and other is your school or University so, I am making an analogy here that your University is your framework and you home is just your library. When you have less number of rules it is more likely that it is going to be possibly a library and, when there are more number of rules there are high chances that its is going to be a framework. for example

In your home can just through off your T-shirt wherever you like and you can just place your bag wherever you like but, when you go to university or school there are fixed places where you are allowed to put your bag and there are fixed places most of time where you’re going to be sitting up, markers for you for your teacher has a fixed place that is gonna be there. Actually you are bounded by more rules while on the other hand at home there are less number of rules.Yes…! you may like to follow some rules but most of them are built by you so Library is more over like your home whatever I want to do I am gonna be doing it and similarly on the framework is more bounded by the rules that you are only to allowed to do certain kind of things.

Technical Understanding:

In technical terms whenever you have a power to call the code that is simple a Library on the other hand Framework calls your code and further your code can call to a library. When we have more freedom that mean’s its more chances that it is going to be a Library when there are more restrictive rules then there are going to be great chances that its gonna be a Framework.

In the last the most and simple way to remember the difference between Library and Framework is to remember who is calling to whom.

SOME POPULAR FRAMEWORKS AND LIBRARIES:

Framework: Rails,Angular,Django,Express

Libraries: React,jQuery, Lodash,Redux

Hope this article helpful for you.

Regards

AHSAN JAMIL

--

--

Computer Scientist

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store