Library vs Framework, what's the difference?

NicolasBrondinBernard

Author
@NicolasBrondinBernard

Is it the same thing—is a framework simply a big library? Let's find out together.

Article published on 07/07/2021, last updated on 09/08/2026

Sometimes during an interview, a single question can tip the scales in your favor. Not that a wrong answer would eliminate you, but let's say that a good answer can give you an edge over another candidate.

This question is one of them, and even some experienced developers don't know how to answer it correctly!

So, what's the difference?

Often, you get a collection of randomly attempted answers like:

  • "It's the same thing, you can use both words"
  • "Framework is the English word for library"
  • "There's a size difference, a framework is much bigger"

Or even:

  • "A framework is a set of libraries that work together"

You might almost think that the real definition is hidden in there, or at least some of these could pass in everyday conversation.

The answer

But the real answer, the one expected in an interview in particular, is different. Here's a simple and quick version:

"The developer uses a library by calling its code, whereas the role of the framework is to execute the developer's code"

And yes, their way of working is almost the opposite of one another!

In French, the word framework is translated as "cadre applicatif" (application framework), because that's its purpose: it provides a framework, an organization, a skeleton, a way of working. Whereas the library only offers features that are often disconnected from one another.

Be careful though, because even though this definition is valid, the word framework being more attractive and synonymous with seriousness, every tool claims to be a "framework" even if it actually behaves more like a library.

For example, we always talk about React as being a framework, when it's actually a library for which you have to manually call the render() function. Here are a few examples of "true" frameworks built on top of libraries you probably already know.

Library vs Framework:

  • React vs NextJS
  • VueJS vs NuxtJS
  • ExpressJS vs NestJS
  • AngularJS vs Ionic

If you go to the home page of each of the libraries on the left, you'll see that they each market themselves as frameworks, but now you'll know how to spot the trick!

If you'd like more in-depth information, you can check out this short article on the Oreilly blog explaining why React is a library (in English): https://www.oreilly.com/library/view/what-react-is/9781491996744/ch01.html


Outcast India sur Unsplash

Finished reading this article?
Our complete courses
Take it to the next level with our courses!

Complete courses, exercises and certificates to really learn programming!

4.8 average rating

Comments (0)

to leave a comment

No comments yet