The Fundamentals of Backend
Backend·6 min read·Jan 1, 2025
In software engineering, and more specifically in web development, the terms frontend and backend refer to two different parts of a same computer system.
The frontend is the visible part of the system that users can interact with, such as a website or a mobile application.
It includes the layout, style, text, buttons, forms, links, and every other component that enable users to perform various actions like navigating between pages, logging in to their account, uploading pictures, and so on.
The backend, on the other hand, is the invisible part of the system that is not directly accessible by users, such as a web server.
Its role is to support the frontend by providing some of the data displayed in the user interface, managing the users data by storing it into and retrieving it from a secure storage location, performing sensitive or complex operations like authentication and data processing, integrating with functionalities provided by third-party services like online payment, and more.
Frontend and backend communication
To communicate with each other, the frontend and the backend use a standardized messaging system called a communication protocol composed of requests and responses, that are sent over a computer network, such as the Internet.
The term request refers to a communicative message that is transmitted by the frontend application to the backend application, whose role is to describe the action initiated by the user on the frontend.
Requests can be of various types depending on the nature of the interaction, such as fetching a web page, submitting a form, sending data for processing, or requesting a specific resource like a file or database record.
The term response, by opposition, refers to the message sent by the backend to the frontend, that contains the requested data, confirmation of a successful operation, or an error message if something went wrong.
For example, when a user performs on search on a website like Google:
- The frontend (i.e. the website) sends a request containing the search keywords to the backend (i.e. the web server).
- The backend processes the request and sends a response back to the frontend containing the matching search results.
- The frontend displays the search results in the form of a webpage the user can visualize and interact with.
Backend service composition
The backend is often composed of several software components (but not necessarily) that work together in order to serve the requests sent by the frontend.
These components usually include:
Unlock the Build RESTful APIs in Node.js module
Learn how to build real database-backed and framework-powered RESTful APIs with MySQL, Sequelize, and Express.
You get immediate access to:
- 37 focused lessons across MySQL, Sequelize, backend, and Express
- 4 real-world projects with commented solutions
- Ongoing updates to this bundle
- Lifetime access to this bundle