
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

CH AP T ER 08 • AP PLIED COMPUTING
Topic: Frontend Stack , RESTful Architecture, HTTP Methods & Stateless Auth
Modern browser applications separate structure, visual presentation, and interactive behavior into three distinct layers:
HTML5: Defines semantic document structure ( , , ) for accessibility and search indexing. CSS3: Controls layout grids, responsive breakpoints, typography, and color themes. JavaScript: Manipulates the Document Object Model (DOM) and executes asynchronous network requests via fetch().
A REST API exposes server resources through clean URLs (such as /api/v1/orders/42 ) and exchanges lightweight JSON payloads. Every request must be stateless , meaning it carries all context needed to process it.
HTTP Verb CRUD Action Idempotent? Typical Success Code GET Read / retrieve resource Yes 200 OK POST Create a new resource No 201 Created PUT Replace an existing resource^ Yes^ 200 OK DELETE Remove a resource Yes 204 No Content
2xx (Success): Request received, understood, and fulfilled cleanly. 4xx (Client Error): Invalid syntax ( 400 ), missing login ( 401 ), forbidden role ( 403 ), or missing route ( 404 ). 5xx (Server Error): Backend crash or upstream gateway timeout ( 500 , 503 ).
Stateless Authentication with JWT After verifying credentials, an API issues a signed JSON Web Token (JWT). The client attaches Authorization: Bearer to future headers so the server can verify identity cryptographically without storing session memory.