Topic 2: Client-Server Architecture


1. Introduction to the Client-Server Model
📌 What is a Client?
• A user’s device (computer, phone, tablet) that requests data from a server.
• Examples: Web browsers, mobile apps.
📌What is a Server?
• A powerful computer that stores and delivers content or services.
• Examples: Web servers, API servers, database servers.
📌Example:
• A client is like a customer at a restaurant, and the server is like a waiter bringing food from the kitchen.
2. Differences Between Client and Server
Feature | Client | Server |
Who uses it? | End-user | Handles requests |
Example | Web browser | Website backend • |
Processes | Display UI | Manages logic, databases |
📌 Example
• You visit YouTube → The client sends a request.
• The YouTube server processes it and responds with videos.
3. HTTP Request/Response Cycle
📌How It Works?
• Client sends a request (e.g., GET /index.html).
• Server processes the request.
• Server responds with data
• Client displays the content.
📌 HTTP Methods
• GET → Retrieve data.
• POST → Send data (forms, logins).
• PUT → Update data.
• DELETE → Remove data.
📌Example:
• A restaurant order – You (client) order pizza (GET), the kitchen (server) prepares it, and you receive it.
4. Frontend vs Backend, Static vs Dynamic Websites
📌 Frontend (Client-Side)
• Code that runs in the browser.
• Technologies: HTML, CSS, JavaScript.
📌 Backend (Server-Side)
• Code that runs on the server.
• Technologies: Node.js, Python, PHP.
📌Static vs Dynamic Websites
Type | Static Websites | Dynamic Websites |
Example | Simple blogs, portfolios | Facebook, Amazon |
Data Changes | Fixed Content | Updates dynamically |
Backend needed? | No ❌ | Yes✅ |
📌Example:
• A static website is like a printed book, while a dynamic website is like a news website that updates regularly.
5. Basics of Web Hosting
• Web hosting stores websites for online access.
• Examples: Shared Hosting, VPS, Cloud Hosting.
• Popular Providers: GoDaddy, Hostinger, AWS, Netlify.
📌 Analogy:
• Hosting is like renting an apartment for your website.
Subscribe to my newsletter
Read articles from Krupansu Sorathiya directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
