Many people confuse between Library and Framework. Here, my purpose to write this article is to turn that confusion to clarity.
Library :
Library is a predefined code which we use in our program directly. For example, if we are coding in C language, we use printf function. This function is defined in library called 'Stdio.h'. We don't have to write code for printing from scratch. We use that readymade function from library.
Suppose we want to make text-to-speech or speech-to-text converter. Now, this is a challenge for us. But C++ provides library namely "Flite or Festival libraries." We just need to use it. There is no need to write code from scratch.
As a software engineer, we can buid our own libraries if we're quite proficient and can make it open source. Or else we can charge for it.
Framework :
Framework itself is a software to make particular kind of application. For Example, Mobile App, web app.
Suppose we want to make a web application. We've two option.
1. Write code from scratch. Organize file structure as per requirement.
Here, there is possibilities of code redundancy. We may not write code so professionally.
But instead if we use framewrok , our task become easy.
2. Use Framework
We can use this to make application. For Example, JavaScript's popular frameworks for web application are Angular, React etc.
Frameworks provide sections/frames to write particular kind of code. For Example, section for business logic, section for designing, section for URL configuration, section for settings etc. Hence, it provides a proper architecture to write code.
Frameworks solves scalability and security issues also. If we want to migrate from one system to another we can do it easily.
Comparison between Library and framework
Thanks for reading. Hope it helps:))
No comments:
Post a Comment