Loading…

The Brutal Lifecycle of JavaScript Frameworks

Article hero image

JavaScript UI frameworks and libraries work in cycles. Every six months or so, a new one pops up, claiming that it has revolutionized UI development. Thousands of developers adopt it into their new projects, blog posts are written, Stack Overflow questions are asked and answered, and then a newer (and even more revolutionary) framework pops up to usurp the throne.

Using the Stack Overflow Trends tool and some of our internal traffic data, we decided to take a look at some of the more prominent UI frameworks: Angular, React, Vue.js, Backbone, Knockout, and Ember.

Framework lifecycle

Stack Overflow Trends lets us examine how each of these technologies has been asked about over time. We can start by looking at some of the larger frameworks.

There was a time when jQuery was the darling of JavaScript tags on Stack Overflow, accounting for almost 8% of new questions. This picture quickly changed as AngularJS and later React were released, cannibalizing jQuery's mindshare amongst the community. Then starting around 2016, there is a quick shift from AngularJS to Angular, which represents the subsequent versions (Angular 2+), as developers began to migrate to the latest and greatest flavors of the popular framework from Google.

These larger frameworks show only part of the picture. There also were smaller frameworks vying for dominance. The picture here shows just how brutal the lifecycle can be.

There appear to be two major phases in JavaScript framework usage. There appears to be a quick ascent, as the framework gains popularity and then a slightly less quick but steady decline as developers adopt newer technologies. These lifecycles only last a couple of years. Starting around 2011, there seems to be major adoption of a couple of competing frameworks: Backbone, Knockout, and Ember. Questions about these tags appear to grow until around 2013 and have been in steady decline since, at about the same time as AngularJS started growing. The latest startup is the Vue.js framework, which has shown quick adoption, as it is one of the fastest growing tags on Stack Overflow. Only time can tell how long this growth will last.

By Language or Technology

There are various factors that may go into a developer's use of one particular front-end framework or another. Developers who primarily work with one programming language or technology may be more inclined to choose a certain UI framework. For instance, we might expect Node.JS developers to choose a different framework than ones who work with Ruby on Rails.

We can get a sense of this by breaking developers into groups based on the tag they most visit, and for each group examine the percentage of traffic that goes to each of these frameworks.

Both TypeScript and CSS users have relatively high traffic to JavaScript frameworks across the board compared to the other technologies we examined. This makes sense as developers who work with these technologies tend to do front-end development, so they're more likely to use a JavaScript framework. The relationship of Angular to TypeScript is particularly strong as Angular (not AngularJS) is written in TypeScript.

As a gut check, we included C and C++ in this analysis. Since developers who primarily use C and C++ tend to do more systems programming, they are less likely to use a JavaScript UI framework, and this is apparent based on the relatively low percentages across each framework.

Angular and React are by far the most popular across the board, no matter the technology used. It makes sense that they are the clear frontrunners, supported by two of the biggest and most influential companies in tech. Just looking at those two frameworks, Angular is more visited amongst C#, Java, and (to a degree) PHP developers, whereas React is more popular with Rails, Node.js, and Python developers.

There are a couple of interesting observations when we look at some of the less popular tags. Ember.js and Ruby on Rails share a disproportionately strong relationship compared to other technologies. This marriage could be due to some of the philosophical similarities between the two frameworks. Ember was created by Yehuda Katz, a member of the Ruby on Rails core team. Due to this, both Ember and Ruby on Rails advocate a convention over configuration paradigm that make these two technologies complimentary and allow developers to quickly be productive without worrying about the nitty gritty configuration, until they need to.

Unsurprisingly, Knockout.js receives disproportionately more traffic by C# developers, most likely since Knockout is also a Microsoft technology. PHP is also an interesting case. It is designed for and primarily used for web development, but PHP developers are not visiting many Angular or React questions (and not too many to JavaScript frameworks as a whole), but visit a disproportionate amount of Vue.js questions.

Industry

The choice of JavaScript framework also varies by industry, which we can segment for US traffic by matching IP address to companies. Since React and Angular are the most popular frameworks, we compared the traffic to each tag in the median organization within each industry.

What industries tended to use each of these frameworks?

We can tell that the media and retail industries by far tend to use these frameworks and have a higher percentage across the board compared to other industries, as companies in these industries tend to gravitate to newer technologies to bring rich client-side experiences to their users to engage with content and refine the online shopping experience. This contrasts with the academic, government, and healthcare sectors, which appear to have little need for these types of frameworks. This may be because those industries are relatively more concerned with database management or data analysis rather than front-end web development.

The largest outlier and mystery is the insurance industry. Compared to other industries, Insurance companies as a whole seem to use Angular at very high rate, without using much React. We're still looking further into why this would be the case, but if there are any developers who work for an insurance company reading this, feel free to leave your conjecture in the comments.

React and Angular Usage in the United States

As we have examined in previous posts, choice of programming technologies differ greatly by geography.

So, keeping with the React and Angular theme, which cities in the United States (among the 25 cities with the most visits overall) are more likely to use these frameworks?

Interestingly enough, this group of cities is split fairly evenly between the frameworks, with Dallas and Denver trending more towards Angular and Brooklyn and San Francisco more towards React. I like to think San Francisco and Brooklyn are two of the trendiest cities in the US, and that this is why developers in those cities are also trendy with regards to their choice of framework.

Conclusion

Let me be clear, even though I'm from Brooklyn and have a budding affinity for React, I am not advocating for the use of any framework in particular. Like every technology choice, it's not about what's "hot," but more about identifying tradeoffs and finding the tool for the problem at hand. But let's be honest, the size of a developer community certainly counts; it contributes to a thriving open source environment, and makes it easier to find help on Stack Overflow.

Whichever JavaScript frameworks you use, if you're a web developer looking to take the next step in your career, here are some currently companies hiring front-end web developers on Stack Overflow Jobs.

Login with your stackoverflow.com account to take part in the discussion.