Frontend Framework Analysis - Aug 2023
If someone asked me "If you were starting a project from scratch today, which front-end framework would you choose", my answer would be Svelte. Actually... Vue. Just kidding, it must be React, right? What about Angular?
If you read my REST API article, you might already know what's coming: it doesn't matter. That, there, is a bit misleading though, and I'll explain why a bit later in this article. First, let's look at the StackOverflow 2023 Survey.
Data, data everywhere!
The most popular front-end framework is React. This should be a non-controversial statement. From the survey:
React - 42.87%
jQuery - 22.85%
Angular - 19.89%
Express - 19.51
Vue - 17.64%
Svelte is way down the list with 6.01%, Blazor at 5.41% and Nuxt.js at 3.89%. We'll need these numbers a bit later, so they're here for your and my reference.
Scrolling down a bit we find the admired/desired section where we can see that raw React is not especially useful and most people prefer to use its meta cousin, Next.js. Even further down is the "worked with/want to work with" section where we learn that React developers want to work with Next.js, and are curious about Angular, Svelte and Vue.
Q: Why are we reviewing all this?
A: We can see what the current market looks like and trends away or towards some technologies.
Data review & derivatives
React devs want to check out Vue, Svelte and Angular
Vue devs don't want to work with anything other than Vue
Svelte devs don't want to work with anything other than Svelte
Angular devs want to check out React
When considering all the above SO survey data, we can derive several assumptions:
React and Next.js make up 60% of the market, but React by itself is not liked much. Devs who use React want to use Next.js. This is because Next.js is a batteries-included framework that makes building full apps significantly easier compared to piecing together various React packages.
Vue and Svelte devs either started with those frameworks or came from React and don't want to go back. This makes sense, because both Vue and Svelte have a better developer experience than React.
Angular devs are interested in React. Here, I'm puzzled. If anything, they should be interested in Next.js, since that's closer to Angular than React is. Perhaps professional curiosity?
Nobody cares about ASP.NET Core, Blazor.
People learning to code just focus on what all the YouTubers tell them to - Node/Express, React/NextJS. This is why adoption of arguably better frameworks like Svelte and Vue is low. When you already learned React and it's 60% of the market, why learn anything else?
It doesn't matter
Let's answer the question I pose at the start of this article and explain why it doesn't matter which framework you choose.
If I were starting a greenfield project today, which framework would I choose? Svelte.
My front-end journey: Backbone (2013) -> Knockout (2015) -> Angular (2016) -> React (2017) -> Vue (2018) -> Svelte (2023). I still have a KnockoutJS project I support, and recently dusted off React. No problem at all.
If you're a CTO or an entrepreneur thinking about which framework you should go with, ask yourself these questions:
Will you hire junior/mid-level front-end developers?
If not, you will hire a senior full-stack or front-end engineer, they should be able to pick up any framework you choose. I recommend Svelte.
Are you thinking about building a mobile app to go along with your web app?
If yes, go with React. React Native is a thing and it's pretty good when you're bootstrapping a business. React skills are 60% transferable to React Native.
If not, go with Svelte.
Are you going to have an API product along with your web app?
- If yes, consider a meta framework like NextJS, NuxtJS or SvelteKit. These come with a backend you can just reuse for your API without needing to build a separate project.
Do you want your developers to be super productive?
Do you already know Angular and plan on building everything yourself?
- Svel... just kidding, go with what you know best: Angular
Above are my opinions, based on my own experience with React, Vue and Svelte.
There are many other things to consider. Mobile-first businesses may consider React Native, but also Flutter and .NET MAUI. If you're going with Flutter, you're in Google's ecosystem, so Angular may be a viable choice, especially if you're using Firebase as your backend. Anyone building with .NET MAUI, good luck! You're in the Microsoft ecosystem, so you may want to consider Blazor -- especially since Blazor Hybrid makes component transfer between projects a breeze.
Let me leave you with this:
Did you find this article valuable?
Support Paul K by becoming a sponsor. Any amount is appreciated!