What is the difference between a Library and a Framework

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this video is brought to you by learn code online dot in visit our website or download our apps hey there everyone hey they sheer back again with another video and in this video we are touching up the great subject of what is the difference between a library and framework yes you might have already touched that subject by looking up the definition of what library as well as in the framework but those definitions are not at all able to give you the whole perspective and is not able to make you understand what actually the individual subject means and also this is a common topic being asked in variety of interviews as well the programming interviews as well so it's going to be really helpful that you thoroughly understand what is the difference between a library and framework and trust me after watching this video you won't be searching for this topic any more further so let's get started now let me tell you what the issue is the issue is many time people try to just say understand what is library and then try to understand what is framework and you'll get bored the answers there but it is not perfectly a correct thing you need to understand both of the things side by side now if you look out into the any definitions or Wikipedia or something like that you will find a quite a common definition which is a collection of library is a framework which can be true or cannot be always true so you need to understand both side by side now I'm gonna give you two examples here the second example will make much more sense but in order to understand that second example let's move on to first example first so library and framework both of them are dependent on the rule one is your home and another one is just like your school or your university so I'm I'm making an analogy here that your school is your framework and your home is just like your library ok so here is my point 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 then it there are high chances that it's going to be a framework for example in your home you can just throw off your t-shirts wherever you like and you can just place your bag wherever you like but when you go to school or university there are fixed places where you put your bag there are fixed places most of the time that where you are going to be sitting up your marker for your teacher has a fixed place that it's going to be there there are some options that you can change them like here or there little bit but it's always gonna be closer to the teacher so that's more like 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 it's like whatever I want to do I'm gonna be doing it and similarly on the framework is more bounded by the rules that you are only allowed to do certain kind of things yes you can go ahead and change all of them but it takes time and Polly such thing now let's move on to the second example this second example is more over code oriented and the people who are associated with little bit kind of the code even like simple JavaScript or jQuery will be able to understand it much more better now in a simple library library is simply a collection of codes obviously so some functions or some like document object model or all these such things are being packed together and is being used over and over that's basically your library is now try to understand in this manner now whenever you are making a call to any library that is most likely to be a library so whenever you have the power to call the code whenever you like that is simply a library on the other hand in the framework actually your framework calls your code and further your code can call to a library maybe but notice the difference here in the library you are making a call to library but in the framework framework is actually calling to your code so just understand in this manner I will take in another very beautiful example which is a difference between jQuery and simply Django less or there are many other frameworks as well 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 in the Django there are mores restrictive environments for example your templates folder should always be named as templates can we change it yes of course but it required digging up into the settings files digging up into the framework so it's most likely that you're going to be calling up your templates folder always as templates because that's what framework is telling you to do so in if somebody next time ask you it's all about the rules when we have more freedom that means it's more chances that it's going to be a library when there are more restrictive rules than there are going to be great chances that it's going to be a framework and again who is calling to whom is a great way of getting the sense that what it is is it a library or is it a framework if you want to get an example always in your head just remember jQuery and Django or maybe Ruby on Rails or maybe any other such kind of framework jQuery is a library and on the other hand your Django is a framework so there you go finally always remember who is calling whom and you'll always get the answer that is it a library or framework and from now onwards you can read those definitions keep that mind but now you know absolutely that I can understand the subject no matter if I remember the definition or not but I do understand the subject and that is going to be most important part so that's it for this video in case you have enjoyed this video give it a thumbs up in case you are enjoying it even more do share it also if you are new at this channel go ahead hit that subscribe button we post amazing stuff all about tech and programming stuff so go ahead hit that subscribe button and I'll surely catch you up in the next video [Music] oh my [Music] [Applause] [Music]
Info
Channel: Hitesh Choudhary
Views: 291,698
Rating: undefined out of 5
Keywords: Programming, LearnCodeOnline, Library, Framework, Library v/s Framework, what is library, what is framework, Library and Framework
Id: sXA1zpv4DhA
Channel Id: undefined
Length: 6min 4sec (364 seconds)
Published: Mon Mar 12 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.