DEV Community

Cover image for Library Vs FrameWork
Sualeh Muhammad
Sualeh Muhammad

Posted on

Library Vs FrameWork

LIBRARY

A library is a collection of prewritten code that can be used to simplify tasks. The term library simply refers to a collection of code that is reused repeatedly. It is essentially a set of pre-defined functions and classes that programmers can use to simplify their work and speed up the development process. So, developers do not have to write code to accomplish specific functionality because the library already includes code for those functionalities.

FRAMEWORK

A framework is like the foundation upon which developers build applications for specific platforms. It includes reusable pieces of code written to perform common tasks and uses code provided by a developer for custom functionality. The framework may include defined and undefined objects and functions that developers can use to create applications. In that way, we can add significant functionality to the system by using existing code around the structure.

Image description

Differences Between Them

*Collection *

Generally, libraries are a collection of helper modules, objects, classes, functions, message templates, pre-written code, etc.

Frameworks consist of a lot of APIs, compilers, toolsets, support programs, libraries, etc.

Code Modification

Codes in libraries are geared toward a particular program or to solve a specific development problem. Therefore, developers must modify library code to meet their needs.

Despite the fact that frameworks generate new codes for developers. These codes cannot be altered or modified later. Unlike libraries, frameworks do not allow users to modify their pre-written codes, so you don’t have to worry about deleting or changing them.

Performance

Less code is required to build libraries, which leads to faster loading times and better performance.

Developing a framework requires a lot of coding, which increases loading times and decreases performance.

Function

In Library program linking and binding process, they play an important role.

you can build and deploy applications in a standard way as the framework already provides code to perform common tasks and uses code provided by a developer

Benefits

Library ()=> {
Good code quality, reusability, and control, enhanced speed and performance of the program, etc.
}

FrameWork ()=> {
Faster programming, support from the community, great support for MVC (Model View Controller) pattern, etc.
}

Top comments (0)