DEV Community

Adeleye Ayodeji
Adeleye Ayodeji

Posted on • Originally published at Medium on

What’s the difference between a library and a framework?


A library can be defined as a bunch of code that can be used for a specific purpose.

The key difference between a library and a framework is “Inversion of Control”

A typical example of a library is jQuery which is a JavaScript library consisting of APIs through which one can easily manipulate HTML and CSS and also provide a better, dynamic outlook to your website.

On the other hand, a framework can be defined as the skeleton of a project which helps you eradicate the need for hard coding, it provides initial support to start the project.

Bootstrap can be considered as a typical example of a web framework that provides you all the predefined classes and fonts and many other features that make your development faster and easier.

As a very summary, library is just for code reuse, framework is for logic or data flow reuse. Libraries mostly can not dictate or guide the way your application design but frameworks can.

Happy Coding 😎🤩

Top comments (0)