Frontend vs Backend – Complete Overview
Introduction
Every website is built from two core parts:
• Frontend: The part users see and interact with (UI).
• Backend: The behind-the-scenes system that stores, processes, and manages data.
Frontend vs Backend
• Frontend: Visual and interactive parts of a webpage.
• Backend: Handles data storage, user profiles, order histories, etc. For example, when you search or
place an order on Amazon, the backend processes it.
This document focuses only on backend technologies. (Frontend tech is explained in a separate guide.)
🖥 What is a Server?
• A server is just another computer, often remote.
• When you place an order on Amazon, your device (client) sends a request to Amazon’s computer
(server).
• The client and server communicate over the internet.
💻 Backend Programming Language
• Servers need to be programmed to understand and respond to requests.
• Backend languages include:
• JavaScript (Node.js)
• Python
• Ruby
• Java
• These languages turn a computer into a functioning server.
⚙ Backend Framework
• Writing a backend from scratch is hard and verbose.
1
• Frameworks help simplify and speed up development.
• Popular backend frameworks:
• Express.js (JavaScript)
• Django (Python)
• Ruby on Rails
• Java Spring
📦 Package Manager
• Most backend code relies on community-written packages.
• Package managers help install and manage them.
• Examples:
• NPM (JavaScript)
• PIP (Python)
• Bundler (Ruby)
• Maven (Java)
🗄 Database
• Used to store all site data (users, orders, products, reviews).
• A database is software that runs on a computer and needs to connect to the backend.
• Common databases:
• MySQL
• PostgreSQL
• MongoDB
Request-Response Cycle
• Basic backend setup = server + database.
• When a user takes action:
• Frontend sends a request to backend.
• Backend saves/retrieves data.
• Backend sends a response back.
• Example: Amazon frontend sends an order to the backend → backend saves it → backend replies
with confirmation.
API – Application Programming Interface
• Requests contain:
• Method (e.g., POST, GET)
• URL path (e.g., /orders )
2
• Payload (e.g., order details)
• Backend only accepts requests defined in its API.
• Example:
• POST /orders → Create an order
• GET /orders → Retrieve order history
• DELETE /orders → Cancel an order
REST API
• REST (Representational State Transfer) is the most popular convention.
• Uses HTTP methods:
• POST – create
• GET – read
• PUT – update
• DELETE – delete
• Alternatives:
• GraphQL: One endpoint ( POST /graphql )
• RPC: Named actions like POST /create_order
☁ Cloud Computing & IaaS
• Companies rent servers from cloud providers.
• Major providers:
• AWS (Amazon)
• GCP (Google)
• Azure (Microsoft)
• This model is called Infrastructure as a Service (IaaS).
🖥 Virtual Machines & Load Balancers
• Providers run multiple Virtual Machines (VMs) on powerful computers.
• During high traffic:
• Multiple VMs handle backend tasks.
• A load balancer distributes requests to them.
• VMs can be added or removed based on traffic.
PaaS – Platform as a Service
• Setting up VMs manually is hard.
• PaaS allows developers to just upload code and auto-setup everything.
• Examples:
3
• AWS Elastic Beanstalk
• GCP App Engine
• Azure App Service
Microservices Architecture
• Large backend split into small, independent services.
• Each service:
• Has a specific task (e.g., orders, payments, email)
• Can use different languages or databases
• Services communicate by sending requests to one another.
SaaS – Software as a Service
• Companies like Twilio offer ready-made APIs for common tasks (e.g., send email).
• Instead of building your own, use a SaaS provider.
• SaaS = someone else’s backend + API.
Advanced Backend Technologies
Additional tools solve special problems:
• Blob Store (e.g., AWS S3): For large files like images/videos.
• CDN (e.g., CloudFront): Fast delivery of static files.
• Search DB (e.g., Elasticsearch): Fast text search.
• Cache (e.g., Redis): Quick access to frequently used data.
• Analytics DB (e.g., Snowflake): For reporting/insights.
• Job Queue (e.g., RabbitMQ): Schedule tasks for later (e.g., email reminders).
Backend Summary
• Core stack:
• Backend language (e.g., JavaScript, Python)
• Backend framework (e.g., Express, Django)
• Database (e.g., MongoDB, Postgres)
• Cloud deployment (IaaS, PaaS)
• Optional: Microservices, SaaS, advanced tools depending on scale & feature needs.