Survey: Ruby on Rails devs happy to go their own way, now prefer Stimulus.js over React

Survey: Ruby on Rails devs happy to go their own way, now prefer Stimulus.js over React

A community survey of Ruby on Rails developers shows stimulus.js, a lightweight JavaScript framework from Rails company 37signals, is now the top choice, displacing React.

The 8th edition of this annual survey was conducted by Rails consultancy Planet Argon, with around 2,700 respondents from 106 countries. This is fractionally more respondents than last year and makes it the biggest yet.

Rails developers prefer monolithic applications over microservices, according to the survey, and that trend is increasing, from 62 percent in 2009 to 77 percent today. This is an example of how Rails developers are happy to go against industry trends, perhaps inspired by Rails inventor David Heinemeier Hansson who advocates self-hosting over cloud, loves the vi editor and suggests that developers use Linux rather than Windows or Mac. 

However, at least when it comes to operating systems, Rails devs have yet to take this advice. 77 percent develop on macOS, according to the survey, though the 19 percent on Linux exceed the small 4 percent using Windows. 

Another area where Rails devs are glad to be different is in JavaScript frameworks, with Stimulus.js at 31 percent usage versus React, last year’s top choice, now only 24 percent. As is often the case, the statistic may be misleading since React-based Next.js is counted separately; but still shows enthusiasm for what 37signals describes as “a modest JavaScript framework for the HTML you already have.” 

Stimuls.js is the most popular JavaScript framework among surveyed Rails developers, ahead of React

The philosophy behind Stimulus.js is that the server-side application generates HTML and the JavaScript exists to manipulate rather than generate that HTML. Like Rails itself, Stimulus.js is controller-based. HTML elements are connected to controllers, which are JavaScript objects that respond to actions trigged by events such as button clicks. 

Stimulus is written in TypeScript and is open source on GitHub under the MIT license.

Other survey responses include that the majority of respondents use Nginx (41 percent) or the Ruby-based Puma (37 percent) as the production web server or proxy, with the venerable Apache only used by 6 percent. 70 percent favor GitHub over GitLab (13 percent) or other source code repositories. CloudFlare (35 percent) has overtaken AWS CloudFront (28 percent) as the most popular content delivery network (CDN). PostgreSQL is by far the preferred choice (86 percent) for the database manager, with MySQL at just 8 percent, though the figure for MySQL currently in production is higher than that for legacy reasons.

When it comes to code editors, Visual Studio Code is top choice (44 percent) but Vim-based editors are next (20 percent) followed by JetBrains RubyMine (19 percent).

Rails is more than 20 years old but remains popular, claiming around 5 percent of the market according to StackOverflow surveys. Rails developers are also relatively content: according to the survey, upwards of 80 percent agree or mostly agree that the Rails core team is moving the project in the right direction, and over 90 percent would recommend Rails to new developers.

Although Rails commands a smaller market share than other options such as Spring Boot, ASP.Net, Django or Flask, it does have some well-known users including GitHub and Shopify.