DEV Community

Adeleye Ayodeji
Adeleye Ayodeji

Posted on • Originally published at Medium on

2

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

adeleyeayodeji

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 😎🤩

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs