DI-322 Web Technologies Lecture 01: Web applications and TCP/IP application services
DI-322 Web Technologies
0% Completed

Lecture 01: Web applications and TCP/IP application services

Outcomes and readiness

By the end, you can distinguish a website from a web application, trace one request through the web stack, and choose the application service named by a URL. First answer: When a browser opens a page, which program decides the route to /courses – the browser, DNS, or the web server? If unsure, revise client/server programs, IP addresses, ports, and strings.

A concrete problem

A student types https://learn.example/courses. The screen appears simple, but several systems cooperate. DNS resolves the host name, transport carries bytes, TLS protects the connection, HTTP expresses the request, the server runs application logic, and the browser turns the response into an interface.

flowchart LR
  U[Student] --> B[Browser client]
  B -->|DNS query| D[DNS service]
  B -->|HTTPS request| W[Web server]
  W --> A[Application]
  A --> DB[(Data store)]
  W -->|HTTP response| B

Text equivalent: the browser uses DNS to locate the host, sends an HTTPS request to the server, the server may call application and data layers, and the response returns to the browser.

Precise model

A web application combines resources, executable behavior, and state exposed through web protocols. A static site can return stored files; an application can also compute responses, validate input, authenticate users, and update data. Common TCP/IP application services include DNS for names, HTTP/HTTPS for web messages, SMTP for mail transfer, and SSH for secure remote administration. The port suggests a service but does not prove it; the receiving program and protocol exchange decide what is actually running.

Worked trace

For https://learn.example:8443/courses?id=7:

  1. Scheme https selects HTTP over TLS.
  2. Host learn.example is resolved to an address.
  3. Explicit port 8443 overrides the HTTPS default.
  4. Path /courses identifies the target resource.
  5. Query id=7 supplies request data.
  6. The response representation may be HTML, JSON, or an error; a URL does not guarantee success.

Faded example

Trace http://lab.example/results?semester=2.

  • Hint 1: identify scheme, host, implicit port, path, and query.
  • Hint 2: HTTP’s conventional port is 80.
  • Solution: the browser resolves lab.example, connects to port 80, requests /results?semester=2, and interprets the returned status, headers, and body.

Common mistakes

  • “The Internet and the Web are identical.” The Web is one application family using Internet networking.
  • “DNS downloads the page.” DNS supplies addressing information; HTTP retrieves the representation.
  • “A port is a physical socket.” Here it is a logical transport endpoint number.

Practical – DI322-LAB01

Open browser developer tools, load one public page, and record the document request’s URL, remote address if shown, method, status, content type, and timing. Then run curl -I https://example.com/ and compare the header view. Do not send credentials or private cookies in screenshots.

Independent check

  • DI322-A01-Q1: A page reads data from a database and returns personalized HTML. Static site or web application? Answer: web application, because the response is computed from application state.
  • DI322-A01-Q2: Which service maps a host name to an IP address? Answer: DNS. HTTP then carries web messages.

Homework – DI322-A01-H1

Draw a trace for a university result portal from URL entry to rendered page. Label at least six components and one failure at each of the name, connection, server, and application stages.

Hint: separate locating, connecting, requesting, computing, and rendering. Rubric/solution: 2 marks correct order; 2 correct protocol roles; 2 server/application separation; 2 four plausible failures; 2 clear arrows and labels. Alternative architectures earn full credit if assumptions are stated.

Revision

Web application = client + protocol + server logic + optional state. Recall: What does DNS return? What does HTTP express? Why can one host serve several applications?