New alternatives for mainstream server-side programming

According to w3techs.com, in August 2018 the usage of server-side programming languages for websites was dominated by PHP with 83.5%, followed by ASP.NET with 13.1% and Java with 2.2%. The same statistics show that PHP kept growing for the past 3 years, while ASP.NET and Java had a downsizing trend.

However, over the past decade new technologies have emerged, such as Ruby & the Ruby on Rails framework and Node.js, and although their popularity is still moderate, their ascend seems promising. Ruby is used by 0.6% of websites, while Node.js powers 0.3% of them. So let’s see what these technologies have to offer to a web developer. We’ll also look at three more up and coming programming languages, namely Go, Scala, and Rust.

 

Ruby & Ruby on Rails

Ruby was released in 1995 by the Japanese Yukihiro “Matz” Matsumoto as a general-purpose programming language. It was designed to support more than one programming paradigm, including object-oriented, functional and imperative. The vision of Matsumoto was to create a programming language that would make the experience of writing code enjoyable (many agree that he achieved his goal), while also increasing developers’ productivity. Thanks to it being closer to a naturally spoken language, Ruby quickly became the first language of choice for many beginner developers.

Ruby on Rails appeared in 2005 as an open-source full-stack web application framework, which boosted Ruby’s popularity, and since then it has been used by companies such as Twitter, Amazon, Airbnb, Cisco, and EA. Developed by David Heinemeier Hansson, Ruby on Rails employs useful software engineering patterns: convention over configuration, active record pattern, model-view-controller, and don’t repeat yourself.

Some of the advantages of Ruby on Rails are:

  • higher development speed (thanks to a modular design);
  • multi-platform support;
  • changes are easier to be performed after the website is launched.

My opinion is that web developers will find writing code in Ruby as “precious” as a gem 🙂

 

Node.js

Node.js was created by Ryan Dahl, and resulted from his desire to have a programming language that can create websites with push capabilities (the publisher initiates the request for a given transaction). Node.js is written in JavaScript and C++, which means that web developers who are familiar with JavaScript will find themselves at home.

It has a vibrant open-source community that constantly produces new modules that add increased capabilities to Node.js applications. This is also fueled by the fact that you only need to know the JavaScript language to produce front-end as well as back-end code.

Some of the great advantages of Node.js are:

  • performance – it does not create a thread for each incoming connection, but instead will allocate a small heap of memory;
  • the fact that it is event-oriented;
  • it has a single-threaded non-blocking approach for requests.

Node.js should not be seen as a new platform which is here to replace other platforms, but rather as a platform that fills some particular needs, especially one that solves the I/O scaling problems, and it is best used in server-side web applications, chat applications, queued inputs, and data streaming.

Node.js is used by companies such as LinkedIn, Microsoft, Yahoo!, and Walmart. Microsoft also integrated a Node.js tool into its Visual Studio IDE, recognizing the place that Node.js has amongst web developers.

 

Go

Go (also known as Golang) is a programming language designed by Robert Griesemer, Rob Pike, and Ken Thompson at Google. It is a statically typed, compiled language, with garbage collection, memory safety, concurrency, and structural typing. Its source code is free and open source – anybody can contribute to the language by making proposals for new features and fixing bugs.

The primary reason for designing Golang was to solve software engineering issues at Google. Its authors also mention that Go was actually developed as an alternative to C++. Being a systems programming language, Go is best used for things such as distributed systems (due to concurrency support), microservices, and cloud systems (web servers, caches).

Some of the advantages of the Go language are:

  • simplified C-like syntax that is easy to read and write;
  • goroutines – a lightweight thread managed by the Go runtime;
  • it compiles quickly, thanks to regular grammar and supporting modules properly.

Go is used by Google for many projects, as well as by other companies such as Netflix, Twitch.tv, Uber, and Dropbox.

 

Scala

Scala is a general-purpose programming language designed by Martin Odersky and released publicly in early 2004. An object-oriented programming language, Scala also provides support for functional programming and is designed to be concise.

Many of Odersky’s design decisions aimed to address various criticisms of Java. Scala is designed to express common programming patterns in a concise, elegant, and type-safe way. It has a flexible syntax and type system that enable the construction of advanced libraries and new domain specific languages.

Some of the advantages of Scala are:

  • immutable values that make it perfect for working with concurrency;
  • type inference, which allows developers to focus on the code itself, rather than on updating type annotations;
  • solid parallelism and concurrency mechanisms.

Scala is used by companies such as Twitter, Foursquare, Coursera, SoundCloud, and Duolingo. Some notable online news publications also use Scala: The Guardian, The New York Times, and The Huffington Post.

 

Rust

Rust was originally designed by Graydon Hoare and first appeared in 2010, while the first stable version was released in 2015. Sponsored by Mozilla, it boasts a feature set that has an emphasis on safety, control of memory layout, and concurrency. Its syntax is similar to C and C++, with blocks of code delimited by curly brackets.

Some of the advantages of Rust are:

  • catching errors during compile time (since it’s statically typed);
  • built-in support for concurrency;
  • the fact that it compiles to machine code, allowing for extra efficiency.

In regards to web development, there are many approaches to creating web apps in Rust: you can compile Rust code to client-side JavaScript, or write a RESTful API, or even build an isomorphic web app.

Although it has a difficult syntax and a steep learning curve, Rust has been ranked as the most liked language by developers for three years running in StackOverflow surveys.

 

In many areas of software programming, new technologies are replacing the outdated ones, but in web development this is not the case, because new technologies are providing new ways for solving various issues. Web developers should not be overwhelmed by the number of programming languages and frameworks available out there, but instead they should choose the proper technology depending on their needs.

Scroll to Top