14 Jul 2019
Frameworks: What are they?
As web technologies evolve, seemingly at the speed of light, the concept of frameworks has become more important for creating large and middle-sized applications.
Frameworks are comprehensive plugins or libraries to enhance already existing programming languages. Frameworks are used to add functionality or simplify processes. They can be seen as tools or extensions to a programming language to make it easier for programmers to perform certain tasks.
A framework itself is not a programming language.
For example, imagine you want to make a strawberry smoothie. You can use a knife to chop the strawberries into very fine pieces. But if you put the fruit in a blender it will take much less time and effort. Another advantage is that you can also ask your friend to make more smoothies – achieving exactly the same result since the mixer’s settings help standardize how the berries are processed.
In this example, the blender represents the framework.
Why Use a Framework?
If frameworks are to make programming easier and more efficient, shouldn’t they be used everywhere, all the time?
Using a framework means committing to a specific technology and in that way standardizing the development. Given that the framework is popular enough it might make it easier to bring on new developers since they are already familiar with the code structure.
Adding a framework, however, also means adding complexity and extra weight.
Complexity concerns how difficult the framework is to integrate with other technologies, as well as how difficult it is for developers to learn and use. A very complex framework can probably be used to do a lot of things but at the cost of making the framework more difficult to handle. Compare a blender with just one button for start and stop, to a blender with twenty different blending settings.
Weight: The longer a code file is, the bigger it is in terms of GB weight. Frameworks are extra code that is added to a web application or site. Heavier files have an impact on website performance and speed, meaning the website will load slower. Website speed can be very impactful on business-related metrics like conversion rates and sales. In short: a slow website means less revenue.
Use a Framework When…
Use a framework when the extra features it brings are needed, and the need outweighs the downside of adding extra complexity and weight to the website.
Don’t use a framework when you don’t really need it (even if it might be convenient for your developers to use the same tools that they are used to).
Coming back to the smoothie example. Say you wanted to have a glass of water and not a smoothie. It would not make sense to bring out the blender to mix a glass of water.
How to Choose the Right Framework
In a world where new frameworks, build tools and practices are constantly introduced and abandoned, choosing a framework that will stand the test of time (at least for more than 2 years) might be more difficult than it seems.
Choosing the right framework can be summarized as choosing the right tool for the job. If you just need a glass of water, there is no need to bring out the whole kitchen arsenal. If you need a smoothie, then a blender is a good choice, especially if you also plan to delegate the creating of smoothies to someone else.
Licenses and Direction
Apart from pure technological differences and dependencies, you might also want to factor in licensing as well as how the creators of the framework might affect it over time. The largest and most popular frameworks tend to be backed by big and influential companies (like Facebook and Google), each with their own framework ambition and use-case.
Even if their frameworks are free to use and the use-case aligns with what you want to build right now, doesn’t mean it might always be so.
To know more about the differences between the top 3 most popular frameworks (for web development), check out our article “Frameworks: Comparing Angular.js, React.js, and Vue.js”.