Web applications are complex beasts. For an end-user they may seem seamless but, in truth, a web application is an interconnected system of elements that are working in unison over the internet to create a unified user experience.
In general terms, a web application can be divided into two: the front-end, or the part of the application that interacts with the end-user, and the back-end, or the part of the application that handles the underlying logic.
The answer from backend developers, on the other hand, is a little more complicated than that. Depending on who you ask, you’ll get all kinds of answers, and that’s to be expected since there is a lot of complexity on the server-side.
Out of all the aspects of back-end development, today we are going to focus primarily on what languages and frameworks are mostly used in server-side scripting. We are also going to explore what are some of the strengths and weaknesses of each one, so you can have a clear picture of the most common technologies in it.
What is server-side scripting?
In the simplest of terms, scripting is laying out a set of instructions to be carried out by a computer, for example, automating a spreadsheet so that it auto-calculates values when some of its cells are filled.
Some functions can be done by either side. For example, if a user has to input a number and they instead write a letter, the browser can check the input before it sends the data to the server (client-side verification) or it can be processed by the server which returns an error message (server-side verification).
Now that that’s cleared up, let’s talk about languages commonly used for that task.
Ok, time to deal with the elephant in the room (that’s a pun for you PHP lovers). PHP is one of the most venerable languages in web development, as it was one of the first languages specifically designed to create dynamic content. Nowadays, over 66% of websites use PHP in one way or another, especially because it’s a great tool to build forums, message apps, and shopping carts.
As for its core strengths, it’s open-source, it has a huge community, it’s well maintained, there are dozens upon dozens of libraries that require very little effort to set up and use, it integrates wonderfully with relational databases, and it’s quite easy to read and understand.
As for its weaknesses, the fact that it’s very open and dynamically typed means that it’s extremely forgiving of errors. In fact, inexperienced developers can make highly inefficient solutions for simple problems using PHP.
Also, some of its most well-known libraries are buggy and full of exploits, which are well known at this point. Expert developers can easily patch them out, but for someone inexperienced that can pose a security risk down the line. Finally, like any other interpreted language, PHP can be slow at times.
Another perk is that Node.js is a lightweight and lean runtime environment. It’s very fast, especially compared to other competitors like PHP. The fact that it’s so lightweight makes it a great choice for microservice scalability.
As for its flaws, the most glaring one is that it bottlenecks with heavy computations. For several reasons Node.js is effectively single-threaded, which means that anything that relies on a lot of computational power is going to be extremely slow.
Python is the little language that could. What began as a project to create a friendly and easy to teach programming language has become one of the greatest juggernauts of software development.
In general, Python is a strong programming language that is very easy to read and learn, it has massive support and there is a library for pretty much anything you might want. It’s a well-known industry secret that most companies like Python because of how easy it is to develop with it.
Most back-end developers don’t use just Python to create their server-side scripts, though. Instead, they rely on frameworks such as Django and Flask that handle a lot of the heavy lifting. On one hand, Django trades versatility for speed. If you are ok with working within a limited framework you can get a project up and running in hours. In comparison, Flask is extremely lightweight, so much so that it lacks functionalities that are given in other frameworks.
As for its flaws, given that it’s an interpreted language, Python is slow. If speed or memory management is important for your project you might be better off somewhere else. Also, each framework has its own set of intricacies. For example, Django is like a whole new dialect in some places, so much so that it’s better to think of each framework as its own separate thing.
Much like Python, you can’t talk about server-side scripting in Ruby without talking about Ruby on Rails, an extremely powerful and reliable framework released back in 2004 that had a huge growth in popularity in the early 2010s.
Why is Ruby so popular? Mainly because it’s a very friendly and easy-to-read programming language that’s accessible to all levels of skill. Specifically, Ruby on Rails was one of the first frameworks of its kind, offering some amazing solutions that could produce results in record time.
It’s no exaggeration to say that RoR set an industry standard that it’s alive up to this day. Its ease of use and clean documentation definitively make you feel like you are on rails.
As for its cons, it’s very CPU and RAM-intensive, and while it has been getting better with each release, it’s still heavy in comparison to its competitors. On the other hand, RoR much like Django, relies heavily on templates and standards, for its very limited flexibility wise.
To close off this list we have Java, the 500-pound gorilla of internet backends. Java started as an all-purpose low-level language in 1995 and was a huge success due to its focus on object-oriented programming. Since then, it has been nothing but a victory lap for it, as almost every single device in the world has a bit of Java in it.
As for server-side scripting, it’s really powerful, it’s flexible, it’s extremely fast, and like any other low-level language, a good developer can deeply optimize it for peak performance.
Unfortunately, that’s also its biggest downside: it’s a complicated language that requires a lot of experience to use proficiently.
Having a top-five list leaves many great languages and frameworks out of the picture, like .Net and PERL. I wish we could go over each one since every language brings something amazing to the table, but since we don’t have space, here is a final thought.
There is no such thing as “ the language to rule them all.” Each technology brings something unique to the table, and our job is to find the right combination of strengths that’s a fit for your project. In other words, the best language is the one that works for you.