If you want to switch to the old version Click Here

Guide to Programming: Back-end Development

blog-detail-img

You probably know that software engineers always consider the front-end and back-end of their applications. But what does this specifically mean? If you’re interested in the technical and visual differences between them, you’ve come to the right place, because in this blog you’ll learn about web back-end architecture.

Front-end is code that is executed for the client side. This code (usually HTML, CSS, and JavaScript) works in the user’s browser and creates the user interface.

 

Back-end is code that runs on the server, which receives requests from clients and contains the logic to send them relevant data. The back-end also contains a database that permanently stores all the application’s data. This blog focuses on the hardware and software on the server side that makes all this possible.

What types of clients exist in the BACK-END?

back-end-web-arqiteqtura-front-vs-back-end

 

Everything that sends requests to the back-end can be considered a client. They are often browsers that request HTML and JavaScript code, which they use for the end user to perceive the website. However, there are many different types of clients: it could be a mobile application, an application running on another server, or even a smart device connected to the web.

What is the back-end?

The back-end is all the technology needed to process an incoming request, generate a response, and send it to the client. This usually includes three main parts:

 

Server. This is a computer that receives requests. Application. This is an application running on the server that listens to requests, retrieves information from the database, and sends a response. Database. Databases are used to organize and maintain data.

What is a server?

 

A server is simply a computer that listens for incoming requests. Although there are machines created and optimized for this specific purpose, any computer connected to a network can act as a server. In fact, you often use your own computer as a server when developing applications.

What are the main functions of an application?

The server runs an application that contains logic on how to respond to various requests based on HTTP and Uniform Resource Identifier (URI). The pair of HTTP and URI is called a route, and matching them based on the request is called routing.

Some of the handler’s functions will be middleware. In this context, middleware is any code that is executed by the server between receiving a request and sending a response. These middleware functions may modify the request object, query the database, or otherwise process the incoming request. Middleware functions typically end by passing control to the next function, not by sending a response.

 

Eventually, a terminal function will be activated that completes the request-response cycle by sending an HTTP response to the client.

What types of responses can the server send?

The data that the server sends back can be of different types. For example, the server might use an HTML file, send data in JSON format, or might only send an HTTP status code. You’ve probably seen the status code “404 – Not Found”; which appears when you try to navigate to a URI that doesn’t exist. But there are many more status codes that indicate what happened when the server received the request.

 

What is a database and why do we need to use them?

 

Databases are typically used for the back-end of web applications. These databases provide an interface to permanently store data in memory. Storing data in a database reduces the load on the server’s CPU main memory and allows data recovery in case of server crash or power loss.

What is a Web API?

 

An API is a collection of clearly defined methods of communication between different software components. More specifically, it’s an interface created by the back-end. A web API is defined by the types of requests it can handle. This includes the defined routes and the types of responses that clients receive.

Other principles of the BACK-END request-response cycle:

  • The server typically can’t give responses without a request; 
  • Every request needs a response, even if it’s just a 404 status code indicating that the content couldn’t be found; 
  • The server should not send more than one response per request. This will cause errors in the code;

Request composition

  • Ana is shopping on SuperCoolShop.com. She clicks on the picture of her smartphone case and a GET offer is sent to the following link: http://www.SuperCoolShop.com/products/66432. Where GET describes the type of request. The URI (Uniform Resource Identifier) /products/66432 indicates that the client is looking for additional information about the product and this product has ID 66432.
  • Ana’s request goes across the internet to one of SuperCoolShop’s servers. This is one of the slowest steps in the whole process because the request can’t go faster than the speed of light. For this reason, large websites that have users all over the world have many different servers and direct the user’s request to the closest server.
  • The server, which is actively listening to all user requests, receives Ana’s request.
  • Event “listeners” that receive this request (HTTP verb: GET and URI: /products/66432) are activated. The code that runs on the server between the request and response is called middleware.
  • While processing the request, the server code activates a database request to get more information about the specific product. The database contains all other information Ana wants to know about this smartphone case: product name, product price, several reviews.
  • The database request is executed and the database sends the requested data to the server. It’s worth noting that database requests are one of the slowest steps in this process. Reading and writing from static memory is quite slow and also, the database might be on a different device than the original server.
  • The server receives the necessary data from the database and is now ready to build and send a response to the client. This part of the response has all the information the browser needs to show Ana more details about the phone case. The response header contains HTTP status code 200, which indicates that the request was successful.
  • The response spreads across the internet, to Ana’s computer.

 

  • Ana’s browser receives the response and uses this information to create the view that the client finally sees.

So, if after reading this blog you’re convinced that Back-end Development is an interesting and necessary field, start learning from scratch, join us on the Introduction to Programming course!

Tell your Friends

You may interest

Intermediate
1350₾
The demand for tech talent has never been higher, making it increasingly challenging for companies to find and attract the best human resources. In this competitive environment, recruiters need not only a deep understanding of the tech industry but also practical expertise in how to find, onboard, and retain A+ tech professionals. This course is packed with practical work and designed to provide a detailed understanding of current trends, platforms, and qualifications - it's a mini MBA in human resource recruitment for the technology sector. Throughout the course, students will learn the complete 360-degree process of [Tech] recruiting.
14 Lectures
42 hours
Beginner
1050₾
Artificial Intelligence has become an integral part of the modern manager's role. Therefore, the better we understand what language to use and how to communicate with artificial intelligence, the easier it becomes to integrate it into our daily lives. Most importantly, artificial intelligence enables efficient time use and helps avoid routine tasks. Throughout the lectures, we will study how to use popular AI systems such as ChatGPT, Claude.ai, and Gemini. Working on practical assignments and the final project will help us gain in-depth knowledge about using AI tools and 'taming' them to our needs.
6 Lectures
18 hours
Intermediate
1700₾
In the modern world, no digital product or service is considered complete without a mobile application. Approximately 86% of mobile users worldwide use Android, making it the most popular direction in mobile development.Mobile applications are a type of software, so the initial stage of the course focuses on learning programming languages and approaches. After this, we move on to Android-specific frameworks, tools, and the application creation process.
24 Lectures
72 hours hours

ჯერ კიდევ არ იცი რომელი პროფესია შეგეფერება?

შეავსე ქვიზი და მიიღე პერსონალიზებული რეკომენდაციები კარიერულ გზასთან დაკავშირებით

დაწყება