Skip to main content



How JavaScript Frameworks are Prone to Cascades

When I asked the lead developer on my team why we are using the JavaScript framework React.js as opposed to other alternatives, his response was “I don’t know, it’s just what everyone’s been using recently.” Frameworks like React.js are notoriously prone to network effects and cascades, where their popularity is often enough for developers to ignore their own reservations and adopt it due to the many advantages of using a framework that’s on the rise.

A large contributor to the powerful network effects of JavaScript frameworks is StackOverflow, an extremely popular forum for engineers to ask other engineers questions about the problems they encounter in software development. For example, when a framework has many users, there will be many engineers who have already encountered problems using the framework, and so resources like StackOverflow can make the product much easier to use for a newcomer. When frameworks are still in the early stages of adoption, it can be difficult to convince potential new adopters to invest the time to learn how to use the framework, given that there aren’t many peer-to-peer resources that can help them yet. This phenomenon perfectly illustrates how network effects factor into what frameworks developers choose to use: a developer must take into account their own reservations about a framework as well as how many other developers are already using the framework.

Recognizing the importance StackOverflow has on the popularity of a framework, Ian Allen, a developer for StackOverflow, was able to leverage data on the volume of questions on the forum as well as internal traffic data to provide a novel and interesting perspective on the lifecycle of JavaScript frameworks. The article not only describes the rapid rise of new frameworks due to their popularity on StackOverflow, it also warns about their sometimes equally speedy decline in popularity after peaking. Allen explains that for some frameworks, they can enjoy meteoric rise due to the positive feedback of network effects, but once the novelty wears off, and an even newer framework comes onto the market, users can abandon the framework with equal passion. Using questions per month on StackOverflow as a metric for popularity, Allen was able to construct a graph showing the sometimes staggeringly impermanent lifecycle of a new framework (Figure 1).

Figure 1: Graph showing the relative popularity of several niche JavaScript frameworks over time.

This fragility associated with the userbase of frameworks reminded me of the discussion of information cascades from this course. Specifically, I believe that two of the “lessons from cascades” are applicable here (textbook section 16.7):

  1. Cascades can be based on very little information: All a framework needs to take off is a single Discord server with some dedicated developers. After that, most developers are adopting due to the assumption that other developers have vetted the product for them, and that it must actually deliver on its promises for them to take the time learning a new framework. Even private signals of doubt or problems with the framework can be disregarded, as it is assumed that the many other users of the product surely must’ve considered them before adopting, and that StackOverflow will answer any remaining questions. This is what happened to me on my team using React.js, and why my team lead had truly no other advantages to offer other than its current popularity.
  2. Cascades are fragile: As the analysis from Allen shows (Figure 1), within 5 years, the framework backbone.js went from obscurity, to being one of the top niche frameworks, and back to virtual obscurity. Since rapid adoption of new frameworks can be based on such little information, it makes sense that equally little information could be enough to convince developers to switch over to an even newer framework. Indeed, it is surely not a coincidence that the beginning of the decline of backbone.js was when two other niche frameworks (knockout.js and ember.js) were peaking in popularity.

At the time of the article in 2017, Allen writes “the latest startup is Vue.js framework, which has shown quick adoption…Only time can tell how this growth will last”. Indeed, more recent data from 2022 from StackOverflow suggests that Vue.js has already passed its peak being indicated by the previous graph (Figure 2).

Figure 2: Graph showing the relative popularity of various JavaScript frameworks through 2022. Vue.js gained relatively mainstream popularity since 2017, but has begun its decline.

The network effects of JavaScript frameworks are easily and widely understood by engineers. It can be inherently difficult to use a new product, since most peer-to-peer resources like StackOverflow will not be useful, and any questions will have to have been accounted for by the designers of the framework (whose documentation is notoriously unhelpful sometimes). While the cascade effect of framework adoption has been empirically noted by engineers like Allen, the cycle of trendy frameworks continues in 2022, and are as blunt as ever. More experienced engineers will often espouse a mantra: each framework has its own advantages and disadvantages, and the one you should use is the one best suited for the job. In other words, you should resist the urge to follow the new trend, unless you actually weigh your alternatives and determine that it is the best one suited for your needs. While these experienced engineers have often lived through one or two popular frameworks’ lifetimes, if new developers don’t want to heed their advice, they could benefit from learning about the problems of information cascades from this course.

 

 

Resources

(main article): https://stackoverflow.blog/2018/01/11/brutal-lifecycle-javascript-frameworks/

(2022 data): https://gist.github.com/tkrotoff/b1caa4c3a185629299ec234d2314e190

 

Comments

Leave a Reply

Blogging Calendar

November 2022
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  

Archives