this post was submitted on 04 Mar 2025
47 points (100.0% liked)
Programming
18675 readers
108 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities [email protected]
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
API is just the term for "the surface of something that's been exposed to you to interact with"
Libraries, websites, tools, etc all have APIs, it's just the general term for "this thing has something we can interface with"
A library is a bunch of code someone else wrote.
A package is when you use a tool to bundle up a library to make it easier to distribute to other people, usually adding a version # to it, and adding it to so.e popular package manager network so millions of people can find your package easier.
A framework is a term for a very big cohesive library, with an advanced api, that does a whole bunch of different things that all have stuff in common. Basically a firework is a huge library that provides many many different things to do that all have stuff in common.
Game Engines for example are frameworks.
A library of tools to make a bunch of different website components that all work well together and have stuff in common is a framework.
Etc etc. It's a bunch of code that doesn't do anything in it's own, but provides a bunch of modular pieces you can assemble into something.
Think of a framework like buying a big box of lego. It's not anything specific yet, but you can assemble all those pieces together to make infinite different things.
I think the best explanation as to the difference between a library and a framework that I've heard so far is this:
A library is something you use to do a specific thing in your project. A framework is something you build your entire project around.
I would describe a framework as something that you embed your logic into, letting it orchestrate the flow for you. You can use several frameworks in one project.
Yeah. The way I normally think of it is that you call a library; a framework calls you.