Рет қаралды 32,954
What is a [software] framework actually?
In our quest to take down popular tech buzzwords, we're going to tackle frameworks next.
A software framework is a bring-your-own-code system that takes your code and runs it through its own complex code that achieves some task.
For example take a look at your operating system (OS). it's a large program that has code for creating files, running processes, and more.
On top of that, you can extend your OS by creating more files and subprocesses to do whatever you'd like.
In this example, the OS provides users a hook into itself. such hooks are a telltale sign of a framework. in general a hook is something that the framework expects YOU, the coder, to fill in. the framework will then take your "thing" and integrate it into itself at some point.
Depending on what specific framework you're dealing with, you will of course have different constraints on what your hook looks like.
For example in the web development framework Next.js, you can create new pages in your site by creating a new file in the `./pages` directory. in this case the pages directory is your hook into the nextjs html generating framework.
In Next.js, you're expected to export a single function as the default function for that file that will later be imported by the nextjs engine.
So a framework is some system that lets you hook into it. this sort of hooking, more formally known as inversion of control, is what differentiates using a library from using a framework.
A great example of inversion of control is taking the train to work versus taking your own car. with your own car, YOU move IT, but with the public transport framework, you're expected to bring yourself to it so IT moves YOU.
#nodejs
#expressjs
#reactjs
#webdevelopment
#softwareengineering
#django
#flask
#fastapi