Upload part 0

This commit is contained in:
AndrewTrieu
2023-03-13 14:34:36 +02:00
parent baba122513
commit bc874e4717
3 changed files with 86 additions and 0 deletions

37
part0/0.4.md Normal file
View File

@@ -0,0 +1,37 @@
# Exercise 0.4
```mermaid
sequenceDiagram
participant browser
participant server
Note right of browser: User enters new note entry and click "Save"
browser->>server: HTTP POST https://studies.cs.helsinki.fi/exampleapp/new_note
activate server
Note left of server: New note entry is added
server-->>browser: Redirect to https://studies.cs.helsinki.fi/exampleapp/notes
deactivate server
browser->>server: HTTP GET https://studies.cs.helsinki.fi/exampleapp/main.css
activate server
server-->>browser: main.css
deactivate server
browser->>server: HTTP GET https://studies.cs.helsinki.fi/exampleapp/main.js
activate server
server-->>browser: main.js
deactivate server
Note right of browser: The browser starts executing the JavaScript code that fetches the JSON from the server
browser->>server: HTTP GET https://studies.cs.helsinki.fi/exampleapp/data.json
activate server
server-->>browser: [{ "content": "HTML is easy", "date": "2023-1-1" }, ... ]
deactivate server
Note right of browser: The browser executes the callback function that renders the notes
```