ITM 202

Web Programming I

TU BITM · Semester 3 · BITM curriculum and programme regulation

Requirement
required
Credits
3
Study Guide
5 units available

Chapter notes

Authoritative study guide across 5 syllabus units

Open a unit to read its study notes.

Unit 1: Web Essentials· 5 LHs· ~6 marks

Part 1: Core Concepts (2 Marks)

  • HTTP (Hypertext Transfer Protocol): An application-layer, stateless, request-response protocol running over TCP port 80 (HTTPS over TLS/SSL port 443).
  • URL Anatomy: https://paperkhoj.com:443/bim/semester-3?sort=recent#notes
    • Scheme: https, Host: paperkhoj.com, Port: 443, Path: /bim/semester-3, Query: ?sort=recent, Fragment: #notes.
  • Statelessness: HTTP servers do not retain client session state across multiple requests by default; state persistence is achieved via Cookies, Sessions, and Web Storage (localStorage/sessionStorage).

Part 2: Structural Frameworks (10 Marks)

3-Tier Web Application Architecture

Presentation Tier: Client Web Browser (HTML5, CSS3, JS)

  • ^
  • HTTP Request / JSON Response
  • v
  • Application Tier: Web & App Server (Node.js, PHP, Python)
  • Business Logic, Authentication, API Controllers
  • ^
  • SQL Queries / Result Sets
  • v
  • Data Tier: Database Management System (MySQL, PostgreSQL)

Part 3: Distinction Tables

Basis of Comparison HTTP GET Method HTTP POST Method
Data Transmission Form data appended to URL as query string parameters. Form data sent in the HTTP request payload body.
Visibility & Security Visible in browser address bar and web logs (insecure). Hidden from URL; suitable for passwords and sensitive inputs.
Idempotence & Caching Idempotent; heavily cached by browsers and proxies. Non-idempotent; not cached by default.
Data Size Limit Limited by browser URL length restrictions (~2048 chars). Arbitrary large payload size (enables file uploads).

Part 4: Worked Problems & Exam Traps

HTTP Request and Response Header Breakdown

  1. POST /api/login HTTP/1.1
  2. Host: paperkhoj.com
  3. Content-Type: application/json
  4. Content-Length: 45
    • {“username”: “bim_student”, “pin”: “2026”}
  5. HTTP/1.1 200 OK
  6. Content-Type: application/json; charset=UTF-8
    • Set-Cookie: session_id=xyz987; HttpOnly; Secure
    • {“status”: “authenticated”, “role”: “student”}

Never pass credentials or sensitive parameters via GET requests because query strings are stored in plaintext inside browser history, bookmarks, and server access logs!