Articles
Frontend and Backend
How they work together and what to learn first

What happens when you log in?
Imagine opening a website or app to log in to your account. You see an email field, a password field, and a “Log in” button. If you leave out the @ symbol in your email address, a warning may appear immediately. After you correct it and press the button, a loading indicator appears. Your account page then opens, or a message tells you that your login details are incorrect.
Two complementary kinds of work make these simple steps possible. One builds the fields and buttons, accepts what you type, and displays warnings and results. The other receives the login request, checks the account details, and decides whether to accept or reject the attempt. This second program usually runs on a server: a computer that receives requests, processes them, and returns results. [1, 2]
We can define the two sides by their responsibilities:
The frontend handles the user interface and interaction: displaying information, accepting input, responding to actions, and showing results. Its work includes how the interface behaves, as well as its colours and layout. The server may also help prepare page content before it is displayed. [1, 2]
The backend processes requests and applies the application's rules. This includes checking accounts and permissions, calculating amounts, and handling and storing data when needed. [1, 2]
| Comparison | Frontend | Backend |
|---|---|---|
| Main responsibility | Build a clear interface that responds to the user | Process requests and apply the application's rules |
| What the developer builds | Interactive screens and interface elements | Services that receive requests and return results |
| In the login example | Fields, warnings, and the loading state | Check account details and allow or reject the login |
| A practical check | Does the error message appear? What does the user see while waiting? | Are incorrect details rejected? Are unauthorised requests blocked? |

Does this distinction apply only to websites?
No. Websites, mobile apps, and desktop programs that connect to services over a network can all have a frontend and a backend. The idea is to divide responsibilities between an interface the user interacts with and a service that processes its requests. This relates to the client–server model. [1]
Consider two ways to use an online shop on your phone. Opening the shop's link in a browser gives you a web interface whose files the browser loads and displays. Opening the shop's installed app gives you a mobile app interface. These different ways of accessing the shop do not mean that each interface needs a separate backend service.
The two interfaces can share the same backend. For example, the mobile app might send a request to add a product to your cart, and the server saves the change. When you later open your account in a desktop browser, the website requests the cart's contents from the same service and displays them. This illustrates how a service can be designed to accept requests from different interfaces. [1, 4]
How can the two communicate if they use different programming languages?
In the login example, the frontend sends your details to the server and waits for its response. In a web application using HTTPS, requests and responses travel over a connection that protects them in transit. The two sides also need to agree on where to send the request, which data it must contain, and the format of the result. [3]
This is where an application programming interface (API) comes in. In a web context, think of it as a defined way for one program to request a service from another. For example: where should the frontend send a login request? Which fields does the backend require? What does it return when the attempt succeeds or fails? [4]
JSON is often used to represent the data being exchanged. It is a text format for data, rather than another programming language to learn. Here is a simplified example of data the backend might return after a successful login: [5]
{
"status": "success",
"user_name": "Ahmad",
"role": "student"
}The frontend reads this data, recognises that the attempt succeeded, and displays “Ahmad” and the appropriate interface for a student. The backend still checks whether he is allowed to access particular data when he requests it. Hiding a button on the screen alone does not enforce access permissions. [7]

The two sides do not have to use the same programming language. A mobile interface could be written in Dart, while its backend service uses Python. What matters is that both follow the agreed communication method and data format. The frontend works with requests and responses; it does not need to read the backend's source code. [4, 5]
This also explains why input needs to be checked on both sides. A frontend warning about an incorrectly formatted email address saves the user an unnecessary wait. But someone can send a request directly to the server, bypassing the app's screen and its checks. The backend must therefore check inputs and permissions too. Server-side checks are necessary, but they do not replace other security measures. [6, 7]
Why is JavaScript used on both sides?
JavaScript is one language, used in different environments for different tasks. In the browser, it can work with page elements: responding to a button click, making an initial check of a field, updating displayed information, and sending a request to the backend. [1, 2]
Node.js provides an environment for running JavaScript outside the browser, including on a server. It is not a new language. You can use it to write a program that receives requests, processes data, works with files or databases, and sends a response. [8]
Knowing frontend JavaScript therefore does not automatically mean you know backend development. The language's rules help you in both places, but each side involves different tools and responsibilities: working with the interface on one side, and applying a service's rules and processing its requests on the other. [8]
What should you learn for each path?
To make sense of the technology names, distinguish a programming language, in which you write instructions, from a framework, which provides tools and structure for building an application. Python, for example, is a language, and Django is a framework written in it. Node.js runs JavaScript, and the Express framework can be used with it to organise web services. [8, 9, 13]
For web interfaces, start with three complementary technologies. HTML defines page elements such as fields and headings. CSS controls their appearance and layout across screen sizes. JavaScript adds programmed behaviour and interaction. In the login screen, HTML describes the fields, CSS styles them, and JavaScript handles events and requests. HTML is a markup language, CSS is a style sheet language, and JavaScript is a programming language. [1, 2]
Once you understand these foundations, you can use a library such as React to make it easier to build interfaces from reusable parts. [15]
| Area | Technologies to start with | How do they fit together? |
|---|---|---|
| Web interfaces | HTML + CSS + JavaScript | Complementary foundations for structuring a page, styling it, and programming its interactions. [1, 2] |
| Mobile interfaces | Kotlin for Android; Swift for iOS; or Dart with Flutter for both | Alternative paths depending on the target platform; you do not need to learn them all. [10, 11, 12] |
| Backend | Python with Django; or JavaScript with Node.js and Express | Two alternative starting paths; choose one to learn how to build services and process requests. [8, 9, 13] |
| Databases | SQL with a database such as PostgreSQL | An important skill for working with structured data when an application needs to store and retrieve it. [14] |
These are starting points, rather than a list of every available tool. For mobile development, choose according to the operating systems you want to support. For backend development, learn to receive a request, check it, carry out the required action, and return a clear result. Django provides tools to organise this work and handle data, while Express provides tools for building web services with Node.js. [9, 13]
Many applications need databases. SQL helps you define tables, add and change data, and query it—for example, to retrieve a particular user's orders. A database is not required for every backend function, however: a service may process a request and return a result without storing anything permanently. [2, 14]
Do you need to learn frontend before backend?
You do not need to master frontend development first; you can start with backend development directly. It still helps to understand what the frontend sends to the server and how it handles the response. Similarly, frontend developers need to understand the requests, results, and errors a service may return, even when they are not the ones writing that service.
If you are new to programming, learn the basics of your chosen language, such as variables, conditions, and functions, then use them in a small task. This helps you understand the code you write before relying on a framework's tools.
For example, you can try out a backend service by sending it a request with a dedicated tool, without building a complete screen. A frontend developer can also start with sample data before the service is ready. Each side needs to understand what it requires from the other and agree on the data format and how to handle success and failure. [4]
How do you choose where to start?
Consider a food-ordering app. Displaying the menu, changing quantities, and showing the order status are frontend tasks. Confirming the final cost, applying discount rules, and saving the order are backend tasks. The frontend may display a price estimate, while the server checks the data and confirms the amount when processing the order.
Frontend development may appeal to you if you enjoy building what users see and shaping how they interact with it. Backend development may appeal if you enjoy organising data and defining the rules that process requests. These interests can guide your exploration; they are not a test that determines your specialisation. Both paths involve logical thinking, problem-solving, and debugging.
Neither is always easier. An interface with many interactions can be complex, as can a service that handles many rules and large amounts of data. The project and your experience affect how difficult the work is, so avoid basing your choice on an initial impression of which path seems easier.
A full-stack developer works on both sides and can follow a complete feature from the screen to the service and its data. This understanding helps with building complete projects and collaborating with other team members. It does not mean mastering every technology on both sides.
Start with the side that fits your goal, and build something small that you understand. Try writing code, changing it, and diagnosing its errors, then expand your knowledge as needed. Choosing a starting point helps you focus; it does not close off the other path.
References and sources
- MDN Web Docs. Client-Server Overview.
- MDN Web Docs. Introduction to the Server Side.
- IETF. RFC 9110: HTTP Semantics.
- MDN Web Docs. API — Glossary.
- IETF. RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format.
- OWASP Cheat Sheet Series. Input Validation Cheat Sheet.
- OWASP Cheat Sheet Series. Authorization Cheat Sheet.
- Node.js. Introduction to Node.js.
- Express. Express — Node.js Web Application Framework.
- Flutter. Flutter Architectural Overview.
- Android Developers. Develop Android Apps with Kotlin.
- Apple Developer. Swift.
- Django Documentation, version 5.2. Django at a Glance.
- PostgreSQL Documentation. Chapter 2: The SQL Language.
- React. Describing the UI.

