Upload part 0
This commit is contained in:
37
part0/0.4.md
Normal file
37
part0/0.4.md
Normal 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
|
||||
|
||||
```
|
||||
32
part0/0.5.md
Normal file
32
part0/0.5.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Exercise 0.5
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant browser
|
||||
participant server
|
||||
|
||||
browser->>server: HTTP GET https://studies.cs.helsinki.fi/exampleapp/spa
|
||||
activate server
|
||||
server-->>browser: HTML-code
|
||||
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/spa.js
|
||||
activate server
|
||||
server-->>browser: spa.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":"","date":"2023-03-13T01:16:01.627Z"}, ... ]
|
||||
deactivate server
|
||||
|
||||
Note right of browser: The browser executes the callback function that renders the notes
|
||||
|
||||
```
|
||||
17
part0/0.6.md
Normal file
17
part0/0.6.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Exercise 0.6
|
||||
|
||||
```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_spa
|
||||
activate server
|
||||
server-->>browser: {"message":"note created"}
|
||||
deactivate server
|
||||
|
||||
Note right of browser: The browser updates the page with the new note
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user