News

Server-Side Language Usage: ASP.NET Trails PHP (by a Lot!)

In what might be seen as good news for Microsoft, its ASP.NET web development framework comes in at No. 2 in usage among server-side programming languages for web projects (even though it's not a programming language) in one ranking.

In what might be seen as bad news for Microsoft, ASP.NET is far, far behind the No. 1 language, PHP.

Web-tech survey specialist W3Techs tracks such things on its site on pages such as "Historical yearly trends in the usage statistics of server-side programming languages for websites." It includes rankings from January 2010 to the present. That 13-year plot shows PHP has always ranked first and ASP.NET has always ranked second. Currently, it's a 78.9 percent share for PHP and 8.3 percent for ASP.NET. But, while the former has remained fairly consistent over those 13 years, ASP.NET has fallen steadily from a high of 24.4 percent in 2010, when PHP had cornered 72.5 percent of the market. Here's the whole chart:

Historical Yearly Trends in The Usage Statistics of Server-Side Programming Languages for Websites
[Click on image for larger view.] Historical Yearly Trends in The Usage Statistics of Server-Side Programming Languages for Websites (source: W3Techs).

Here's a graph showing how ASP.NET (red line, second from top) has fallen off over the years, while most other languages have remained more stable over the entire 13-year span (though Ruby has been coming on strong lately and appears poised to leap over ASP.NET):

Historical Yearly Trends in The Usage Statistics of Server-Side Programming Languages for Websites
[Click on image for larger view.] Usage of Server-Side Programming Languages for Websites 14 Sep 2021 (source: W3Techs).

This is but one ranking, of course, and comparing different rankings is usually like comparing apples and oranges, as each have different methodologies, terminology, product classification, measurement approaches and so on. For example, as mentioned, ASP.NET isn't even a language. Microsoft describes it as "A framework for building web apps and services with .NET and C#." So it's a framework that's part of another framework whose users primarily use C#. Note that W3Techs also lists "static files" and "ColdFusion" as programming languages.

And then there's the argument about whether or not PHP is even a "programming" language. Everyone at least agrees it's a "scripting" language. Beyond those two examples, other variables and biases typically abound in such measurements.

So, even though W3Techs doesn't mention C#, several other surveys and articles about server-side web development do directly compare C# and PHP, while others don't.

Some don't mention either one, like the Backend Developers article on Medium titled "5 Most Scalable Backend Development Languages/Frameworks in 2021–22." It lists Node.js, Python, Kotlin, Ruby on Rails and Java -- no mention of PHP or C#.

A recent BairesDev post titled "Top 5 Languages and Frameworks for Server-Side Scripting" includes almost the exact same list, but substitutes PHP for Kotlin, ending up with a ranking of PHP, Node.js, Python, Ruby and Java.

Going back to 2018, the same cast of characters appear in a post titled "5 top programming languages to learn server-side web development," where the ranking is Node.js, PHP, Java, Ruby and Python.

Obviously, all of the above don't even mention ASP.NET, much less C#. When just analyzing 13 popular web sites, however, C# does make an appearance, though unsurprisingly only for the Microsoft-owned Bing and MSN properties:

Back-end (Server-side) Table in Most Popular Websites
[Click on image for larger view.] Back-end (Server-side) Table in Most Popular Websites (source: Wikipedia).

When not limited to the back end, C# ranks in many web-dev studies and articles, however. One prominent example of that is the big, customizable, interactive "Top Programming Languages 2021" effort from IEEE Spectrum, which lets you filter results by choosing language types such as web, enterprise, mobile and embedded. As shown in the graphic below, that web ranking is: Python, Java, JavaScript, C# and Go:

Top Programming Languages 2021
[Click on image for larger view.] Top Programming Languages 2021 (source: IEEE Spectrum).

And when measuring web-dev frameworks -- as opposed to programming languages -- it's a much different story for ASP.NET. For example, a recent Career Karma post titled "Most Popular Web Development Frameworks in 2021" found that ASP.NET ranks in the top five back-end offerings when measured by the number of jobs on LinkedIn and in Stack Overflow questions. Here's a poorly formatted table showing the latter, where ASP.NET was in second place behind Node.js:

Most Popular Web Development Frameworks in 2021
[Click on image for larger view.] Most Popular Web Development Frameworks in 2021 (source: Career Karma).

But if you're using ASP.NET, you're probably using C#. As Microsoft says: "When using ASP.NET your back-end code, such as business logic and data access, is written using C#, F#, or Visual Basic."

So the main takeaways from this little exploration of server-side web programming language usage as it pertains to readers of Visual Studio Magazine might be listed thusly:

  • PHP, which might or might not be a programming language, is certainly a scripting language that's used heavily in server-side web projects.
  • C# is also used heavily for web development, but mostly on the server side as part of ASP.NET, which is a fairly popular web-dev framework but is certainly not a programming language.
  • Overall, Node.js, PHP, Java, Ruby and Python -- in one order or another -- are generally the top picks for server-side web development programming.

Of course, for the past few years Microsoft has been developing its Blazor offering as part of ASP.NET. Thanks to the use of WebAssembly, Blazor lets C# be used in both its server-side component and on the client side where the predominant JavaScript has long reigned at the top. So things may change.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

Upcoming Events