Frontend Framework Analysis - Aug 2023

·

5 min read

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:

  1. React - 42.87%

  2. jQuery - 22.85%

  3. Angular - 19.89%

  4. Express - 19.51

  5. Vue - 17.64%

  6. Next.js 17.3%

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.

Why doesn't it matter? Because if you know JavaScript well, you can pick up any of these frameworks with ease. They all have phenomenal documentation (yay react.dev) and going from Vue to React, React to Svelte or Svelte to Vue is maybe a week or two of getting used to new syntax and some framework-specific quirks. Everything else is just JavaScript.

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.

React has JSX, but you're mostly writing JavaScript. It's verbose, and hooks are not amazing. Vue has a lot of "magic" resulting in fast dev-to-customer cycles, but there's a bit of ramp-up for new developers learning said "magic". Svelte is super lightweight, and there's a fair bit of magic too, but the syntax is a lot simpler. Svelte is also different in that it's a compiler. You never ship the framework to the customer, resulting in a smaller bundle size.

Closing Thoughts

If you're a CTO or an entrepreneur thinking about which framework you should go with, ask yourself these questions:

  1. Will you hire junior/mid-level front-end developers?

    1. If yes, they probably learned React on YouTube, so if your workforce is proficient in React but not JavaScript, go with React.

    2. 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.

  2. Are you thinking about building a mobile app to go along with your web app?

    1. 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.

    2. If not, go with Svelte.

  3. Are you going to have an API product along with your web app?

    1. 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.
  4. Do you want your developers to be super productive?

    1. Svelte
  5. Do you already know Angular and plan on building everything yourself?

    1. 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:

If you hire strong front-end developers with solid JavaScript basics, they will be able to jump into any framework you throw at them. Ramp-up time is 1-2 weeks, so it honestly doesn't matter which framework you choose.

Happy building!

Did you find this article valuable?

Support Paul K by becoming a sponsor. Any amount is appreciated!