What is a framework and why use it?
Software Development frameworks
Let's talk about that in this article. Well consider a stone building, you probably understand a bit about physical buildings. It's got a framework and that's the essential supporting structure of that building. In programming terms, think of a framework as some software that's already been developed and is used to help you create your own application. So, it's basically a reusable code that provides specific functionality that you can use in your programs. Basically, the intention of a framework is to avoid you, needing to reinvent the wheel. An example of a framework in Python is the Django Framework (in which Instagram is built).
A simple use case
Imagine a scenario where you need to sort some names out. You'd got a list of names, which your running in Python. And you want to figure out how do I actually sort those into alphabetical order.
Now, you could do it manually. In order to do that you'd have to figure out how to write the sorting code. You basically have to come up with a way to sorting alphabetically and after that, you'd have a way to find a way to and write it in such a way that it was very efficient. In practical terms, it wouldn't be an efficient use of your time. And the reason for that is there's a framework out there.
there's code out there that will already write that or already perform that functionality, in this case sorting for you.
The Django already provides a sort method and it's basically coded for you to just 'call' and/or use.
That's practically allowing you to focus on your program, and not to worry about the low-level stuff. Now, the other thing to keep in mind is that this code, this framework is probably been, well-worked on by a number of different programmers. It's been tested, it's been optimized, and it's probably going to be a lot more efficient (code-wise) than you can produce yourself. Of course, it would take just one programmer a long time to come up with the level of the code in some of these frameworks, and the Django Frameworks is just one of a thousand examples.
Simply put, you wouldn't want to be doing that type of code yourself, while you want to be focusing on the high-level software & functionality.
Worrying about this low-level, basic kind of stuff is reinventing the wheel in every sense.
Should every programmer know?
Keep in mind that every good programmer, not only knows the basic syntax of a programming language, but they also know one or more frameworks as well. In Python terms learning the Django framework would be a great thing to add to your resume, and it also makes you a more productive programmer as well.
Alright, I hope this helped to broaden your general digital knowledge. If you got any questions feel free to give us a call and we'll explain this further.