Which Programming Language?

Visualwebz
8 min readApr 23, 2020

--

A Comparative Analysis of 15 Languages Used for Web Development

Background Information

The Internet plays a huge role in our lives. People can send messages, read the news, and use services such as Amazon and Facebook online because of the Internet. Simply put, the Internet is the infrastructure that connects millions of computers across the world. The modern Internet arose in the early 1980s, and its two most well-known pioneers, known as “the fathers of the Internet,” are Vint Cerf and Bob Kahn; however, the World Wide Web, which is what most people interact with when using the Internet, was invented about a half-decade later in 1989 by Tim Berners-Lee. The difference between the Internet and the World Wide Web is that the World Wide Web is a possible service because of the Internet. For example, the websites people visit daily, such as Google and YouTube, are part of the World Wide Web, but they would not exist without the infrastructure provided by the Internet. The World Wide Web can be accessed via web browsers, such as Google Chrome and Safari, and information on the Web can be found using search engines, such as Bing and Google.

As the World Wide Web grew, so did web development and web development software and programming languages.

Web Development

Web development refers to creating websites for use on the World Wide Web. Two essential terms widely used in web development are front-end and back-end development. The front end, or client-side, refers to the part of the website that the user directly interacts with or what is on their screen. The back end, or server-side, refers to the website that the user can not see or what goes on behind the scenes. This distinction is vital because different languages are used for front-end and back-end development.

Introduction

In total, it is estimated that approximately 8,945 different programming languages exist (“Online Historical…”). This begs the question, which languages should one use as a web developer? This paper compares front-end and back-end languages by evaluating them based on three categories: simplicity, performance, and popularity. The research shows that although some languages are more popular and widely used than others, choosing which languages to use to develop a website requires an analysis of that website’s purpose or sub-purpose and varies case-by-case basis.

The front-end languages covered are HTML, CSS, and JavaScript, and the back-end languages covered are C, C#, C++, Go, Java, Objective C, Perl, PHP, Python, R, Ruby, and Scala. As a quick note, HTML and CSS are not programming languages. They are used to express the presentation or layout of a website instead of “doing” something. For example, HTML cannot be used to add numbers but coupled with a back-end programming language, and it can display the calculation. However, HTML and CSS are fundamental to web development and can still be evaluated in the same categories as the other languages to a certain degree. By comparing all these languages, some of the main advantages and disadvantages of each language will be identified, thus making it easier to determine which situations warrant the use of a specific language.

Results

Simplicity

First, simplicity is a significant factor in choosing whether or not to use a specific language to develop a website. Simplicity describes how easy a language is to learn and use. Along the same lines, it also explains how readable the code produced by a language is. Many times, especially within comprehensive technology or web service companies such as Microsoft and Twitter, web developers have to write code that will be shared with others, so using a simple language that produces more readable code will generally be more beneficial than a language that produces code that is harder to understand. Besides, more people will know the language because it is easier to learn, and more people will be able to implement the code in a larger project because it is easier to use.

In a program written in a simpler language, it will be easier for the developer to identify and fix the error because the code is more readable; however, in a more complex language, the developer will have to examine the busy code to resolve the same error tediously. Thus, there will be no reports on where exactly the error is because it was neither a syntax error nor a runtime error. This is why the simplicity of a language is crucial, not only in web development but also in other development types. Among the top languages used for web development, a survey of 909 developers showed that 13.3% of developers thought that HTML was the simplest, followed by Python (9.0%), JavaScript (6.2%), PHP (4.9%), Java (4.6%), R (4.4%), Ruby (4.1%), and Go (3.6%); among what they believed to be the most complicated languages were C# (4.4%), Objective C (3.9%), C++ (3.6%), and C (3.6%) (“How do developers feel…”). Since Perl is similar to Python in terms of what it accomplishes, it does not emphasize readability, unlike Python. Since its syntax is similar to C, it can be inferred that Perl’s simplicity ranks between those two languages. Since Scala is a less-readable extension of Java, it can be assumed that Scala ranks slightly below Java. Finally, since CSS is often used hand-in-hand with HTML, it can be assumed that CSS ranks closely with HTML.

Looking back at the numbers, it is evident why the languages are ranked the way they are by considering readability. C requires a deeper understanding of how the computer works because it utilizes low-level features, which are more difficult for a human to read, and C#, C++, and Objective C are all based on or inspired by C in some way. On the other hand, the simplest languages resemble the English language the most. For example, one of Python’s main merits is that it was designed with readability in mind (“What is Python?…”); in fact, Python will report whitespace errors, such as incorrect indentation and spacing, which are not checked for in many other languages and drastically improves the readability of code. All in all, the advantages of simpler languages are plentiful, and thus simplicity is an essential factor in choosing whether to use a language for web development. However, other factors must be considered as well.

Performance

Performance is also an essential factor to consider when choosing which language to use as a web developer. In brief, performance refers to how fast a language can execute instructions. Websites with a lot of traffic and client-server interaction, such as Facebook, use languages that facilitate high performance to handle the number of users they have. However, performance may be less of a concern on a less popular website. If the website’s goal is to become more popular, an easily scalable language should prevent the need to rewrite the server code in another language in the future. For example, as Twitter’s user base increased, the company had to transition from Ruby to Scala because Scala was more capable of handling the daily heavy load that Twitter faced. It was a laborious process; developers had to be retrained, and few Scala developers existed during the transition. Performance is a significant consideration in a language.

Among the top web development languages, according to a performance test, the fastest was Java, which took six seconds to execute a test program, followed by Go (7s), C++ (10s), C (10s), JavaScript (10s), PHP (38s), Python (44s), Perl (436s), and Ruby (523s) (Mateo). Since Objective C is based on C, it ranks roughly equivalent to C in terms of performance, although C# is slower than C in most cases. Scala is known to be faster than Java (Naghipourfar). R consistently ranks between Python and Ruby (“Programming Languages…”). Since HTML and CSS are concerned with the presentation of websites, performance is not a factor in these languages. The languages are ranked the way they are because the fastest ones are usually compiled while the slowest ones are interpreted. For example, C and C++ have compiled languages, so their code is translated into machine code and executed all at once, which is generally faster.

On the other hand, languages such as Perl and Python are interpreted. Their code is translated into machine code and executed line by line, all at runtime, which is generally a slower process. Performance is an essential factor in choosing a language for web development. High-performance languages allow web developers to handle more users and perform more tasks in a set amount of time. However, in addition to performance, the popularity of a language should also be considered.

Popularity

The popularity of a language is essential when deciding which languages to use for web development. If web developers want to work for another company, they should be familiar with the most popular languages because those languages will most likely be in higher demand. Also, popularity usually reflects other desirable aspects of a language, such as simplicity and performance.

Furthermore, with popular languages, other developers create more tools that will make programming in that language much easier than a less widespread language and thus has fewer tools available. Of course, popularity has no meaning, but it gives an idea of how valuable people believe a language is. According to the TIOBE Index, which measures how popular a programming language is based on how often it is searched for on sites such as Google, among the top languages used for web development, the most popular programming language is Java, which has a rating of 16.73%, followed by C (16.72%), Python (9.31%), C++ (6.78%), C# (4.74%), JavaScript (2.38%), PHP (2.37%), R (1.54%), Go (1.36%), Ruby (1.25%), Perl (0.97%), Objective C (0.94%), and Scala (0.49%) (“TIOBE…”).

Since HTML and CSS are necessary for displaying websites, virtually every web developer is familiar with those two languages. The popularity of these languages is partly attributed to the features they provide. For example, C is popular because it allows programs to quickly access system resources, such as memory (Kumar). The popularity of a language can reflect the language’s merits and usefulness, which is an important consideration when choosing which language to use to develop a website.

Summary of Results

Here is a table presenting a summary of the results and the rankings of the languages in each category.

* HTML and CSS are concerned with the presentation of websites, so performance is not a factor in these languages. ** In general, since HTML and CSS are vital to the production of websites, most web developers are familiar with them. Thus, they are ranked first and second.

Takeaway on Programming Languages

All in all, the simplicity, performance, and popularity of a language give a good idea of its capabilities of that language. But other factors, such as website security, determine why they are better than others. Simple languages are more readable, high-performance languages can get more tasks done in a shorter period, and popular languages provide more tools and reflect how useful a language is thought to be by the community of web developers.

Considering all these categories, an idea of which language is best to develop a website can be formed. However, this process could be more clear and drier. As stated before, the best language or languages for a specific website depend on that website’s purpose and vary case-by-case basis. Some web developers may sacrifice simplicity for more performance, and some may sacrifice performance for simplicity based on their needs and desires. In the end, each language has its advantages and disadvantages, and it is up to the web developer to determine which language best fits their tasks.

--

--

Visualwebz

A Seattle web design and online marketing agency that delivers high-end websites. A passion for web development and SEO.