Well, “most popular” is a risky claim. Especially when it comes to programming languages: there are ardent admirers for each language and each language has its own niche where it rules.
Lies, damn lies, and statistics…
The order of popularity changes based on what data you look at.
Before we get into the details of how we at Chargebee compiled the rankings, let’s look at some of the ways in which you could arrive at the list of top programming languages.
You could do a broadly based rating using multiple parameters such as search engine results like Tiobe did, or if you are popular among the devs like the folks at StackOverflow, you could decide to get it right out of the horse’s mouth.
You could also look at it based on job postings, which is what Coding Dojo did.
Or, you could have a different take on it — you could look at the number of API libraries that have been released for that language, like they do at ProgrammableWeb.
Collating them brings up a pattern, the odd one being ProgrammableWeb’s list:
|Popularity Ranking||Tiobe||Stack Overflow||Coding Dojo||ProgrammableWeb|
Measuring Popularity Based on API Requests
We decided to add one more angle to it by looking at the actual API requests from the apps that have integrated with Chargebee using the language-specific SDKs.
Even though you could use Chargebee as a standalone service for your billing needs, most SaaS companies integrate with us tightly to leverage our subscription billing features, and they tend to use the SDK of the language that their service is built with. So when we exposed our REST flavored API, we also released SDKs for the “popular” languages.
Our judgement of the “most popular” is based on the actual number of merchants using a particular language library to integrate with Chargebee for their billing.
We specifically took into account only the merchants who are actively making API calls to the billing system. We have excluded requests that come to the sandbox accounts.
Just like browsers add information about themselves (including its version) in the “user-agent” header, each of Chargebee’s client library adds its information in that header in http requests sent to the API endpoint, which in turn is recorded as a part of the access logs in the server.
A sample user-agent header sent by php client looks like this:
For each request, we can identify the SDK used along with its version. We use Splunk to analyze our logs. A simple query gave us the results.
Before we jump into the data, let’s first look at the languages for which we have released the official SDKs and our take on their popularity.
PHP - The Trusted Workhorse
The Web runs on PHP. Well, at least most of the popular content management systems like WordPress are based on PHP. So it might seem like the obvious choice at first. But giving it deeper thought, we expected the API users to be the “hip” startup crowd. We expected them to use more of the newer and cooler languages like Ruby or Python, rather than PHP.
Ruby - The Coveted Gem
That Ruby On Rails is popular among startups is no secret. We expected Ruby to come closer to PHP in terms of usage.
Python - The Opinionated
Python is another language favored by startups. We expected it to be slightly less popular than Ruby, but a lot more popular than Java.
NodeJs - One Language to Rule All
We released the Node JS library based on few customer requests. It was the last language flavor we released. We didn’t expect much usage as the server side js platforms are still new in comparison with other platforms.
Java - The Stale Mocha
It has fallen out of favor with the startups. It is now considered enterprise-y. Too verbose and bloated. We expected very low usage.
.NET - The Foot Soldier of The MS Camp
Most of us at Chargebee come from the Linux background right from the beginning. And most of us have switched to Mac now. There are few Linux holdouts (like me). But MS and its developer ecosystem have always been an enigma to us. We weren’t sure of the number of users would use the .NET library when we released it.
What We Expected
We expected PHP to lead, closely followed by Ruby and Python, with Java trailing as the distant fourth.
Data from one year ago (Q2, 2015)
A year ago, we looked at a slice of data spanning three months. And the usage pattern is as below:
As we can see, PHP still rules the web, followed at a distance by Ruby. The surprise is that the usage rate of .NET is more than that of Python.
We would have released the .NET library before the Python one, had we had this insight earlier.
Current data (from Feb, 2016)
No major changes. But PHP seems to be losing some points to Python and Ruby. NodeJS has increased and Java has dropped.
Rephrasing the Claim, the Popular Programming Languages for SaaS and eCommerce are…
If we look at our findings, we could see that it is more in alignment with ProgrammableWeb’s rankings.
The stark point is the popularity of PHP when compared to other languages.
We understand that our usage based dataset might be biased due to the profile of the customers using Chargebee’s billing solution.
But if behemoths like Paypal and Stripe publish their findings, it would provide a more solid dataset as most SaaS businesses would at least have a payment gateway integrated, if not a full-fledged billing solution like Chargebee.
Do you have a dataset that’s different from what we’ve shared? We’d love to know!