The web is filled with different types of content for all audiences. People use it to watch videos, file taxes, interact with communities, or even share cat pictures. Web frameworks are one of the main technologies that make the web what it is today. But what exactly are web frameworks? Why do Developers like them so much? And are they really necessary? To give you a good idea of what they are, we will have a look at the three famous web frameworks: Angular, React, and Vue.js. But before that, let’s go back in time just a little bit!
History of the web
Why use a framework in 2021
These days, the support of web standard is a lot better in all modern browsers. So, if the differences between browsers are minimal, what are the reasons Developers still like to use frameworks?
SPA (Single Page Application)
Single Page Applications (SPA) are, as the name implies, web applications that only have a single page. A quite misleading name, as these websites can still look like they have multiple pages. Traditional websites load HTML from the back-end for every page, but SPAs switch the page in the front-end itself. This results in a more responsive website with more flexibility.
Please keep in mind that Developers have their own specific features that they look for in frameworks, and every project demands a careful look at what it requires. This blog highlights specifically the big three frameworks: Angular (by Google), React (by Facebook), and Vue.js (by Developers in the open-source community). As they are all open-source software, Developers worldwide are able to submit suggestions and changes, which the core team validates, tests, and merges into the codebase if it follows the principles the projects were built on.
Angular is the oldest and the youngest of the three frameworks.
It was introduced as AngularJS (not Angular in 2010) and soon became the most popular framework.
Because AngularJS became too limited for the features, it has been redesigned and was again released as Angular 2 in 2016.
Unfortunately, Angular 2 is not compatible with its predecessor.
Angular releases two major versions in a year.
It aims to be a complete solution for a whole web application.
While it’s not for everyone, the new Angular isn’t going away soon. But watch out for web applications that are still using the old AngularJS, as the official support for that will very soon be stopped on the 31st of December 2021.
React was released in 2013.
It only has features for the presentation layer of the website. Meaning that React applications need additional libraries for advanced state management, routing, API requests, and many other features.
The team behind React also introduced the Flux architecture, which is a concept of how to implement state management, that very neatly fits into the principles behind React. Redux is a very popular implementation of the Flux architecture, often used with React.
With its flexibility, it comes as no surprise that React attracted all Developers that did not like the strict rules imposed by Angular. In 2021, React is the most commonly used web framework, and while newer frameworks are rising, we can expect React to stay near the top in the following years.
Vue.js was developed by Evan You, an ex-Google Developer, in 2014.
It was created with React and Angular in mind, offering flexibility and simplicity of React, while providing the guidance and tooling of Angular.
Vue.js is very approachable – by adding one line to your HTML, you can start using Vue, allowing the developer to very quickly create a small Vue application. This application could also easily be added to an existing, traditional website.
It has a limited scope out-of-the-box but has official libraries for more advanced concepts like state management and routing.
Vue.js is very quickly rising in the ranks. Moreover, with the Composition API introduced in Vue 3, Developers have only more reasons to like it. It might never overtake React, but for developers looking for a bit more structure and a complete ecosystem, while maintaining flexibility, Vue.js is a very good choice.
What to choose in 2022?
While the above-mentioned frameworks are still very good choices for the near future, there are a couple of new trends that you should keep an eye on:
It’s certainly still possible to create interactive websites without web frameworks, but it’s unnecessarily complex without those features the current frameworks provide. Asking which of the three is “the best” is not a fair question. A better question would be: “Which framework is the best for my website?” Every project has its own requirements. Every team has its own skills. Only by keeping these conditions in mind, you can decide which framework to choose.
This blog is written by Joris Molnár – Software Engineer at Mediaan Conclusion.