Class 2 - How the Web Works
1/20

How the Web Works

CSCI 4513 - Web Programming

Class 2 - Thursday

🌐 β†’ πŸ’» β†’ πŸš€

Today's Journey: From Networks to Websites

2/20

Today's Learning Objectives

3/20

Let's Start Simple: What's a Network?

πŸ’» ↔ πŸ’» ↔ πŸ’»

Network: Two or more computers connected together to share resources

4/20

The Internet: A Network of Networks

🏠 Local Network β†’ 🏒 ISP Network β†’ 🌍 Global Internet

The Internet is NOT:

The Internet IS:

5/20

Key Players in Internet Infrastructure

🏒 ISP (Internet Service Provider)

  • Cox, AT&T, etc.
  • Connects you to the internet
  • Assigns you an IP address

πŸ“‘ Router

  • Directs traffic between networks
  • Your home router + ISP routers
  • Finds best path for data
6/20

Packets: How Data Actually Travels

Think of it like shipping a book page by page:

πŸ“– Large File β†’ πŸ“„πŸ“„πŸ“„πŸ“„ Packets β†’ πŸ“– Reassembled

7/20

IP Addresses: The Internet's Phone Numbers

IPv4: 192.168.1.1 IPv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

But wait... who remembers IP addresses? πŸ€”

8/20

DNS: The Internet's Phone Book

"google.com" β†’ DNS Server β†’ "142.250.80.46"

Domain Name System (DNS) translates human-friendly names to IP addresses

  1. You type: www.okcu.edu
  2. Your computer asks DNS: "What's the IP for okcu.edu?"
  3. DNS responds: "It's 104.16.20.146"
  4. Your computer connects to that IP
9/20

Client-Server Model

πŸ’»

Client

  • Requests information
  • Your web browser
  • Mobile apps
  • "Customer" at restaurant

πŸ–₯️

Server

  • Provides information
  • Hosts websites
  • Stores data
  • "Waiter/Kitchen" at restaurant

Client: "Give me the homepage" β†’ Server: "Here's the HTML, CSS, and images"

10/20

Don't Confuse These!

🌐 Web Browser

Software to access websites (Chrome, Firefox, Safari)

πŸ” Search Engine

Website that finds other websites (Google, Bing, DuckDuckGo)

πŸ“„ Web Page

A single document (this slide deck; it appears to be many pages but its just one with a fancy presentaton)

🏒 Web Server

Computer that hosts and serves web pages

11/20

What Happens When You Google Something?

Let's trace the journey step by step...

πŸ€” β†’ πŸ’» β†’ 🌐 β†’ πŸ” β†’ πŸ“Š

12/20

The Google Search Journey: Steps 1-2

1️⃣ You type "google.com" in your browser

2️⃣ DNS Lookup

13/20

The Google Search Journey: Steps 3-4

3️⃣ Establishing Connection

4️⃣ Google's Server Responds

14/20

The Google Search Journey: Steps 5-6

5️⃣ You type your search and hit Enter

6️⃣ Google Processes & Returns Results

15/20

Quick Note: HTTPS (The Padlock πŸ”’)

HTTP

  • Unencrypted
  • Like sending postcards
  • Anyone can read

HTTPS

  • Encrypted (secure)
  • Like sealed envelopes
  • Only recipient can read

Always look for the padlock when entering passwords or payment info!

16/20

Activity: Know Your Tools

What browser are you using right now?

Visit: whatismybrowser.com

Why does this matter for web development?

17/20

Internet vs. World Wide Web

🌍 Internet

  • The infrastructure
  • Physical networks
  • Existed since 1960s
  • Email, FTP, gaming, etc.

πŸ•ΈοΈ World Wide Web

  • One service on the internet
  • Web pages with links
  • Created 1989 (Tim Berners-Lee)
  • HTTP/HTTPS protocol

The Web runs ON the Internet, like cars on a highway

18/20

Quick Review: Can You Answer These?

Understanding these concepts = Speaking the language of the web!

19/20

Environment Setup

Homework Reminder:

20/20

Environment Setup

Required Resources (from Odin Project):

Questions? Let's discuss! πŸ€”