Every website you visit can be split into two parts : a frontend development and a backend development. While frontend development deals with the user interface and the visuals of the website, backend development is responsible for the behind-the-scenes work, such as data storage and management. If you have ever wondered what all comprises backend development, we have got it covered. In this article you would get a complete overview of all the aspects that comprise backend development along with the technologies used in backend development.
Introduction
Backend development refers to the process of building and maintaining the server-side of a web application. It involves the implementation of the logic, database interactions, and integration of various components that enable the frontend to function seamlessly. Backend developers primarily work with server-side languages, databases, APIs, and other tools to create the backbone of a web application.
To understand, let’s start from the ground up
Any computer can send a message over the internet to another computer. This done with the help of the internet protocol suite better known as the TCP/IP protocol.
The issue is that computers can’t receive messages from the internet by default. Most devices (phones, tablets, computers) need to be programmed to receive messages. To program the computers a backend programming language is needed. Almost every programming language has a feature that turns a computer into a server and allows it to receive messages. Some popular backend programming languages are Javascript (Node JS), Python and Java.
Now we run into a new problem. If you have ever dealt with programming, you would know that programming a backend server using just the programming language is an almost impossible task. It not only requires writing a lot of code, but also managing and troubleshooting it.
To make this task easier, we use a backend framework and a package manager.
Backend Framework
Backend development frameworks simplify the process of building web applications by providing pre-built components and libraries. It basically makes it easy for you to focus on your idea and your particular use-case without worrying about coding all the functionalities from scratch. Some popular frameworks include Express.js (Node.js), Django (Python) and Spring (Java). These frameworks offer a structured approach to development. Using these frameworks helps reduce the time and effort required to build backend applications.
Package Managers
In the backend we also use various code that other people have written called packages to do common and repetitive tasks, e.g. doing calculations, talking to a database and setting up user log-in and authentication.
We typically use a lot of packages in our backend. In order to install and manage all these packages, we need something called a package manager. NPM (NodeJs), PIP (Python) and Maven (Java) are a few common package managers.
A computer that is programmed to receive messages or data from other computers is also known as a backend server.
Basically, to create a backend server, we need a backend programming language, a backend framework and a package manager.
Programming Language | Web Framework | Package Manager |
Javascript (NodeJS) | ExpressJs | NPM |
Python | Django | PIP |
Java | Spring | Maven |
The next problem you have is that you need somewhere to save your data for the website. This data can be anything. It can be data you are receiving from other computers. It can also be your own data.
Take the example of facebook. It needs to collect and store data of millions of people all accross the world. Or of amazon, it needs to store all it’s user profiles, orders and product data.
Even if you are making a small online store of your own, you would need to keep track of your inventory, customer orders, and sales information.
To store and manage all this data efficiently and securely, we use a database management system.
A database management system is a piece of software that usually runs on a different computer (database server) from the computer you progammed (Backend Server). You’ll need to do some set-up so your backend server can communicate with the database.
There are many databases you can choose from. The most popular being MySQL, Postgres, MongoDB.
Now you have a backend server and a database server.
The backend server communicates with the frontend and the database server. This forms the basis of every functional web application.
Let’s see how this works:
Suppose you have a website phonenumber.xyz
. In this website you can look up a name of a person and it would return their phone number.
Let’s see how it works:
Step 1:
User types in the name of the person whose number he wants, say “Marcus Aurelius” on your website (this is the frontend portion) and presses enter. This initiates an HTTP Request.
Step 2:
This request is sent to the backend server of phonenumber.xyz
using the internet or more specifically, the internet protocol suite.
Step 3:
The backend server queries the database server. Basically, it asks the databasse to provide the phone number of the person requested by the user. In this case, “Marcus Aurelius”.
Step 4:
The database server finds the phone number and returns it back to the backend server.
Step 5:
The backend server then responds with the number. Basically it sends the number back to the user’s computer via the internet.
Step 6:
The phone number is displayed on the user’s computer using the frontend of the website. In this case, phonenumber.xyz
.
In the above example, the user went to the domain phonenumber.xyz
and sent an HTTP request to our server. This backend server was pre-programmed to handle the HTTP request in a particular manner.
We program our backend server to handle all incoming HTTP requests in certain ways. So our server basically has a list of all allowed HTTP requests and how to respond to each. If a request which is not allowed is made, the backend responds with an error.
This list of requests makes the core of our API or Application Programming Interface.
There are different types of APIs such as the REST API, GraphQL and RPC.
A backend programming language, backend framework, a database management system and an API make up the basis of backend programming. To be a good backend programmer, you should master these basics. You can build most of your projects with these four concepts.
If you want to learn more, you should look into the following concepts:
- Cloud Computing and VMs
- Load Balancers
- Platform as a Service (PaaS)
- Microservices
- Software as a Service (SaaS)