So often when learning software development you would have come around these terms - library, frameworks, and modules.
If you're like me, you might be wondering what the heck these even mean? They all look the same!
According to FullStackPython, a framework is -
a code library that makes web development faster and easier by providing common patterns for building reliable, scalable and maintainable web applications.
Okay, but what the heck is a "library" now?
According to Google, it is -
Hey Krishna π, give me strength to not lose my fu***ng cool.
So, a framework is a library, and a library is a module. Nice, nice, gotta appreciate our predecessors. (the engineers before us)
Now, according to this popular website to learn javascript, a module is -
As our application grows bigger, we want to split it into multiple files, so called βmodulesβ. A module may contain a class or a library of functions for a specific purpose.
A library of functions you say? π
\my literal reaction*
Anyways, I'm here to to save you from all this rage, and consume it if you're already enraged. π
Simply put all these terms (framework, library, and module) refer to the REUSABLE CODE. Like we have:
math.h in C Language.
npm packages in Javascript.
pillow and numPy in Python.
In case it's not clear, I'll say it again. The terms framework, module, and library mean one thing which is "REUSABLE CODE".
Much like how you create functions in your program so that you can use them again and again. That's right there is reusable code.
End
Now a few technicalities before I end this blog, and nerds don't jump at me in the DMs. (since that is the only place they can jump at me.)
Framework: Along with reusable code this mf also defines the architecture of your application. It has the audacity to impose certain design patterns. Example - Django.
Library: This guy is just a collection of related reusable code. For example - the PILLOW library in Python has a bunch of code to play around with image files.
Module: This might not click at once but the modules are part of your project file. For example - In a large javascript-based project, imagine a file dedicated to uploading images to a cloud provider. This file can be termed as a module. It has a specific purpose in your code and offers reusability.
Now if someone on the web hits you with terms like modules, framework, library, component, utility, blah blah blah, etc, you can just go easy in your mind and think it's all just reusable code. That's it.
My Twitter, in case you want to reach out - https://twitter.com/x_pixel22