Lect-2: Basic Internet Protocols, HTTP Request Message
and HTTP Response Message, Web Communication
Model, Web Development Strategies
Basic Internet Protocols
When computers communicate over the Internet, they follow rules called protocols. These
rules make sure data reaches the correct system, in the correct order.
IP (Internet Protocol)
IP is responsible for addressing and routing.
Every device has an IP address, and IP ensures data packets reach the correct
destination.
TCP (Transmission Control Protocol)
TCP provides reliable communication.
It checks errors, ensures packets arrive in order, and retransmits lost data.
Used in web browsing, emails, file transfers.
UDP (User Datagram Protocol)
UDP is faster but unreliable.
No error checking or retransmission.
Used in video streaming, online games, voice calls.
DNS (Domain Name System)
Converts domain names ([Link]) into IP addresses.
HTTP / HTTPS
Used for communication between web browsers and web servers.
HTTP Request Message
An HTTP Request is sent by a client (browser) to request a resource from a server.
Parts of an HTTP Request
1. Request Line
Contains:
o HTTP method (GET, POST, etc.)
o Resource path
o HTTP version
Example:
GET /[Link] HTTP/1.1
2. Request Headers
Provide additional information about the request.
o Browser type
o Data format
o Host name
Example:
Host: [Link]
User-Agent: Chrome
3. Blank Line
Separates headers and body.
4. Request Body (optional)
Contains data sent to the server (mainly in POST requests).
Example: login details or form data.
📌 GET → request data
📌 POST → send data to server
HTTP Response Message
An HTTP Response is sent by the server after processing the request.
Parts of an HTTP Response
1. Status Line
o HTTP version
o Status code
o Status message
Example:
HTTP/1.1 200 OK
2. Response Headers
o Content type
o Content length
o Server information
3. Blank Line
4. Response Body
o Actual content (HTML page, JSON data, image, etc.)
Common Status Codes
200 OK – Request successful
404 Not Found – Resource not available
500 Internal Server Error – Server problem
Web Communication Model
The web works on a Client–Server model.
How it Works
1. User enters a URL in the browser
2. Browser sends an HTTP request
3. Server processes the request
4. Server sends an HTTP response
5. Browser displays the result
📌 Web communication is stateless – each request is independent.
Web Development Strategies
Web development strategies define how websites and web applications are built.
1. Static Web Development
Uses HTML and CSS
Same content for all users
No database
Simple and fast
2. Dynamic Web Development
Content changes based on user input
Uses server-side languages
Connected to databases
Example: login systems, dashboards
3. Frontend and Backend Separation
Frontend: User interface (HTML, CSS, JavaScript)
Backend: Server logic and database
Communicate using APIs
4. MVC Strategy
Model – Data and database
View – User interface
Controller – Handles requests and logic
5. Modern Web Strategy
Responsive design (mobile-friendly)
REST APIs
Cloud deployment
Single Page Applications (SPA)