What are the Differences Between Library and Framework

Library vs Framework

What are the Differences Between Library and Framework

In this article, I will tell you about the most famous topic of programming interviews that what are the differences between library and framework? Most people confuse this topic. They find about library and framework on the Internet. And they got some answers about it. They search about library and framework. But they don’t get the right answer for this topic. If you will read this article till the end then I hope that you will get satisfaction with the differences between library and framework.

Library vs Framework
Library Vs Framework

Now let me tell you that what the issue is. The issue is that people were trying to understand what is the library and just trying to understand what is the framework. And they will get different answers for their queries. But it is not a perfectly correct thing. You need to understand both of the things side by side. If you will compare it side by side then you will never get confused about both of the topics. When you look out for any definition then you got that the collection of the library is called a framework. Which can be true or cannot be true? So you need to understand both sides by side. Here I will tell you the differences by two examples hope you will get the right answer after reading these examples.

Example No. 1:

In this example, the library is like your home and framework is just like your university. Where is the less number of rules it may be your home it means a library? And where is a large number of rules it may be your university means framework? For example, in your home, you can through of your t-shirts whenever in your home. And you can place your beg whenever you like. But when you are in a college or university then you have some fixed places whenever you can put your begs. There are some few options to put your beg or other things. So that’s like you are bounded by more rules. So as we know that we cannot do more things with a framework if we want to do more things in a framework then we need to change a lot of code, just like your college or university. But in your home, you have very less number of rules and most of the rules are built by you. But in the framework, you more bounded by the rules. You can do some certain kind of rules. Yes, you can change all of them but you need to spend more time, your efforts and you need to change much code.



Example No. 2:

The second example in more our code oriented. If you are familiar with some little bit kind of code just like JavaScript and jquery then you will understand this example. So the library is the packet of such kind of functions, methods, objects etc. It can be used in many places. So it means whenever you want to call a code then it is a library. And let’s talk about framework then framework calls to your code and your code calls to the library may be. But not is the difference here. In a library, you are making a call to like a library. But in the framework, the framework is actually calling to your code. Here I will tell you by an example of Jquery and Jango. So in both of these things whenever you want to make a call to a Jquery library, you can make it. On the other hand of Jango, there is the more restrictive environment. For example, your template folder named with the name of ‘template’. Can we change it? Yes, we can change it. But it requires digging up into the settings files, digging up into the framework. So it most likely that you have gone to calling your template folder always a ‘template’. Because that’s worked framework is telling you to do.

So if somebody next time asks you. It’s all about the rules. When we have more freedom that means there are more chances that it gone be a library. When there are more restrictive rules then there are more chances to that it gone be a framework. And who is calling to whom is a great way to getting a sense that what it is? It is a library or it is a framework. If you want to get an example always in your head then just remember about the Jquery and Jango. Jquery is a library. And on the other hand, Jango is a framework. So there you go. Finally always remember that who is calling whom. And you will always get the answer that it is a library or it is a framework. From now onwards you can read those definitions keep that mind. Now you will get absolutely answer to your question that what is the difference between library and framework. No matter what you have the definition of library and framework. You should understand it. And that is the most important for every programmer.



So that it in this article. I hope you will get the answer to your question. If you love this article then show me your love in the comment section below. If you have any question regarding this article then you should write it down below at the comment section below.

You should also read these articles:

Is C the best way to start your career with programming?

Which programming language should I learn first?

If you want to buy any programming course then you should visit here

Best Web Development Company in Roorkee

Leave a Reply

Your email address will not be published. Required fields are marked *