Utility · for the week and the whole project
Resources
Web development has the deepest documentation culture in software, and two sources carry almost all of it: the framework's own docs and MDN, the web platform's reference. Both will serve you daily through the project weeks.
References you will actually use
| Resource | What it is | Use it when |
|---|---|---|
| Flask documentation | The framework's own docs: quickstart, routing, templates, request data, patterns | Any Flask question past this hub's slice; the Quickstart re-teaches today in its own words |
| Jinja documentation | The template language: variables, loops, conditionals, inheritance | The project dashboard outgrows single placeholders |
| MDN: HTTP | The web platform's reference on the protocol: methods, status codes, headers, caching | A status code or header you have not met; the theory page, at full depth |
| MDN: HTML | Every element, attribute by attribute | Building out the project's page beyond the ten tags |
| MDN: Fetch API | The browser's request machinery, exactly as the dashboard uses it | POSTs with other body types, errors, timeouts, anything past the two calls you have |
| paho-mqtt on PyPI | Week 9's bookmark, still current | loop_start/loop_stop details and the threaded-loop notes behind the bridge |
Background reading, stage by stage
| After reading… | Deepen with |
|---|---|
| The web, quickly | Wikipedia: HTTP and Web server, the protocol's history and versions, and the server role your Pi now plays |
| The dashboard | Wikipedia: WebSocket, the push-to-browser option this week named and declined, so you know what you declined |
| The project begins | Week 5's hub, re-read with stakes: the five qualities and the verification table are now grading instruments aimed at you |
Practice between classes
- Narrate the circle. The Set-button path, protocol by protocol, from memory, until it takes under thirty seconds; it is the exit ticket, a demo-day answer, and the best systems interview answer this course gives you.
- Break it on purpose. Remove
0.0.0.0, re-block 5000, rename the template, flipdebug=True: provoke each wall once, read its signature, fix it. The troubleshoot table learned this way is yours forever. - Design your project's routes. On paper: every path, its method, its answer's shape, next to your topic table in
docs/. Two namespaces, one system, both deliberate. - Skeleton work. The D2 target is end to end; spend home time on your project's scariest interface first.
- Ten minutes of MDN. Skim the HTTP overview once; recognizing header names now saves console-squinting later.
Glossary
| Term | Meaning |
|---|---|
| HTTP | The web's client-initiated, stateless request/response protocol, over TCP |
| Client / server | The asker and the answerer of one exchange; roles, not machines |
| Request / response | The matched pair: method, path and headers in; status, headers and body out |
| URL | Scheme, host, port, path: protocol, machine, door, resource |
| GET / POST | Read, safe to repeat / submit, acts; the dashboard uses each by its contract |
| Status code | The response's verdict: 200 OK, 400 bad request, 404 not found, 500 server error |
| Stateless | Each request stands alone; the reason the bridge holds the latest values |
| HTML | The tag tree pages are made of; ten tags carry this week |
| Flask | Python's standard microframework: routing, templates, a dev server, little else |
| Route | One registered path-and-method mapped to one Python function |
| Template / Jinja | HTML with {{ blanks }} filled per request from templates/ |
| jsonify / JSON API | Routes answering with data for scripts and pages; Week 9's format, other protocol |
| Dev server | Flask's built-in server: bench-right, production-wrong, and says so |
| Bind address | Which interfaces a server listens on; 127.0.0.1 loopback-only vs 0.0.0.0 all |
| fetch | The browser's JavaScript HTTP call; the dashboard's asking half |
| Polling | Asking on a timer; right-sized here, indicted in Week 9, both for stated reasons |
| The bridge | Shared latest-values state: MQTT callbacks write, routes read |
| loop_start | paho's background-thread network loop; loop_forever's cohabiting sibling |
| WebSocket / SSE | The web's push options: named this week, available to ambitious projects, not required |
| Walking skeleton | The thinnest end-to-end version that runs; the D2 target and every hub's own method |
| LIA | The term project: 40 %, pairs, five milestones D1–D5, public demo in Week 15 |