Framework vs library vs package vs module: The debate

abbas baman
1 min readOct 20, 2021

In the debate about the difference between frameworks, libraries, packages, and modules, what does each one of them represent?

Module

Is the smallest piece of software. A module is a set of methods or functions ready to be used somewhere else.

Package

Is a collection of modules. This may sound funny, but usually what a package does, is gather a number of modules holding, in general, the same functional purpose. Making it easier to include all the related modules at once.

Library

Well library at its core, is a collection of packages. Its purpose is to offer a set of functionalities ready to use without worrying about the subsequent packages. So a library is what you include when you want to add some functionality to your code. It does not force any coding style on you either.

Framework

It’s a set of libraries. But this time, the framework does not just offer functionalities, but it also provides an architecture for the development work. In other words, you don’t include a framework. You integrate your code into it. He is the wireframe of the project. That’s why a framework forces its coding style on you.

I hope that this quick summary was enjoyable!

--

--