Img source: geeksforgeeks.org
Software developers use the words libraries and frameworks very frequently and interchangeably, but they are not the same. Koushik Kothagal, who is a really good programming instructor, with a lot of helpful tutorials, especially for Java technologies, has published a really great video explaining both of these concepts and is really easy to understand and follow.
Both libraries and frameworks have been developed to help developers save up time from doing repetitive tasks over and over again, and instead, have tools that they simply can use without needing to implement everything from scratch.
In the video, Koushik takes the example of libraries as tools that a carpenter, for example, may need to use. With tools, you may have a set of tools that you may need. These tools, however, are not used simply by a carpenter. They can be used by anyone, for many types of professions. This is the example of the libraries of programming languages. A programming language may have a lot of libraries that you can use for some tasks, like formatting a string, logging the exceptions that may occur during runtime, and other libraries.
Frameworks, on the other hand, may be thought as procedures that are streamlined for a particular task, for example, the procedure of producing tables. This process is specific and applicable only for building tables, and cannot be used to build boats or cars.
Frameworks which also save a lot of time and a lot of effort, but they actually give you less flexibility, due to the constraints that may be needed to be set up in order for a particular framework to function properly. A particular framework that is for building web applications can only be used to build web applications, as it is specialized for that particular objective, whereas a library that can be used for a certain function in a web application can be used for a desktop or a mobile application as well.
Watch the video below to see a little bit more explanations about this from the Koushik himself.
The post The difference between libraries and frameworks with analogies appeared first on Fatos Morina.
Top comments (0)