FRAMEWORK vs LIBRARY

Brief overview

·

4 min read

FRAMEWORK vs LIBRARY

In the era of self learning, getting started and learning programming languages is not a tough task. But understanding the tech terminologies can be a harsh hurdle for any beginner. Particularly when it is about the language we learn, there are high chances we get confused and felt lost back. One such case is, when we can't understand the difference between a frame work and library. I felt the same confusion and figured it out somehow. So as an effort to help my peer learners, I have tried to explain the difference in this article as clear as possible.

Before beginning my explanation, let me give you few examples for both. So that you can get an idea of what I am talking about.

Libraries : React, JQuery

Frameworks : Express.js , Angular.js

First things first, let's understand What are these libraries and frameworks in general. These are tools that provide a collection of codes and code templates to help us in developing our software projects. Even though these terms are used interchangeably, they show significant difference in their functions and control in the library call.

What is a Library?

Library is a set of reusable, tested and compiled data which helps the developers to automate the application of functionalities. It can be used by any number of users for various functionalities. A developer can modify it as per his requirements. Library programs are designed in a way such that, a single library can be used by many programmers for programs that are not even connected. The value of a library is determined by the reuse of the program element. Characteristics implemented in a library could be invoked and gained by a program. A library doesn't implement the behavior itself. They use the modular form to share codes to ease the distribution. Most of the compiled languages have a library.

  • Libraries contain a set of written codes, and dats that can be called by the programmer while coding.
  • They allow the user to control the application flow.
  • They are freely available.
  • They could be used by many programmers.

What is a Framework?

Frameworks are created for the developers to design softwares using them in a standard way. Frameworks help them to deploy softwares as well. They usually include a set of support programs, compilers, toolsets, APIs, and other components that make a complete environment needed for a software development. Furthermore, they also provide the feature of extensibility, through which programmers can extend them according to their need. Please note, that a framework's code cannot be modified by the developers. Callings are usually done by the frameworks and not the programmers. It's an automated support. Frameworks can make the size of the program big sometimes(Code Bloat)

  • Frameworks make the task easier for developers by handing the usual coding issues.
  • They use a collection of low-level libraries and give a coding environment.
  • It controls the overall flow of the program.

Differences between Frameworks and Libraries.

  1. Frameworks are the complete sets of tools that help programmers to design a specific program. Library only allows to use and reuse functions.

  2. Frameworks control the calling of libraries. While working with libraries, developers have to make the call.

  3. Frameworks are browser dependent. Libraries are not so.

  4. Frameworks are intended to decrease the complexity of programming and decrease the time of development. Libraries mainly provide reusable software functionalities.

  5. Developers must stay updated to the new versions to use frameworks but that's not necessary with Libraries.

Conclusion

Both the Libraries and Frameworks are intended to make the development process easier. but the way they provide services differ. Libraries provide the developer only the facility to use and reuse the software functionality, but frameworks allow the user to make use of its features while designing a whole program. Frameworks control all the callings of a library and they take charge of the flow of computer functionality. But for the libraries, only the developers are required to make the call.