A school web app lets students log in and then download a PDF of their timetable. Explain which method the app uses to submit the login form and which method it uses to get the PDF, with a reason for each.
Web Applications — Web Application Communication Methods
About this lesson
This unit teaches how web applications communicate using the client–server model. It defines the client as the side that requests data or processing (browsers and smartphone apps) and the server as the side that receives requests, processes them, and returns responses, and explains that a web application works by the client sending a request and the server returning a response. It then covers HTTP as the communication protocol for exchanging data between clients and servers, and HTTPS as HTTP with added TLS encryption that reduces the risk of content being read by third parties, noting that URLs beginning with "https://" use HTTPS. The unit explains that client requests include an HTTP method indicating the desired operation — GET to retrieve data (displaying a web page, retrieving search results) and POST to send data (sending login information, submitting form contents) — and that server responses include a status code reporting the result, with 200 for success, 404 for page not found, and 500 for a server error. It also introduces the API as a system for exchanging data between different pieces of software, used when the frontend sends requests to the backend, and JSON as a data format that is easy for humans to read and for computers to process, describing an API as a fixed contract for exchanging data. The unit works through practice exercises: true/false statements about client and server roles, HTTPS encryption, the GET method and status code 404; matching descriptions to HTTP, API and HTTPS; and multiple-choice questions on status codes and on what an API is. A worked example gives the solutions, and an exam-style question asks students to explain step by step what happens when a browser requests a web page and the server responds, referring to client, request, HTTP method, response and status code. A "Think as an Engineer" task asks students to plan communication for a school web app where students log in, view their timetable and download a PDF: choosing GET or POST for loading grade history, submitting a login form, and requesting today's schedule from another school system (deciding whether an API is involved), choosing HTTP or HTTPS for login with a reason, and recommending a communication design with two reasons. An "In a New Context" task has a weather service API returning today's forecast, asking which HTTP method the client would use, why the service should use HTTPS, and one advantage of receiving data as JSON. By the end, students should be able to explain the client–server model, distinguish HTTP from HTTPS, describe how HTTP requests and responses work with methods and status codes, and explain the role of an API and JSON in exchanging data.
Questions and answers on Web Applications — Web Application Communication Methods - practice and revision
Multiple choice questions on this lesson in Programming and AI for 2nd secondary - bachaloria, First Term, with practice exercises for revision and exam preparation.
A user opens a page whose URL begins with "https://". State which communication protocol the page uses and one benefit of using it.
A developer says an API is a fixed contract for exchanging data. Explain what this means using the frontend and the backend of a web application.
A smartphone app shows search results after the user types a word. Explain the role of the client and the role of the server in this exchange.
Compare HTTP and HTTPS in one or two sentences.
A web page shows a message that something went wrong on the server side. State the status code that reports this result.
Turn this unit into a ready quiz
Generate a quiz from this unit, send it to your class, and let the answers be graded for you.
Start free