File tree 3 files changed +71
-0
lines changed
0.5 Single page app diagram
0.6 New note in Single page app diagram
3 files changed +71
-0
lines changed Original file line number Diff line number Diff line change
1
+ sequenceDiagram
2
+ participant browser
3
+ participant server
4
+
5
+ browser->>server: POST https://studies.cs.helsinki.fi/exampleapp/new_note
6
+ activate server
7
+ server-->>browser: redirect to https://studies.cs.helsinki.fi/exampleapp/notes
8
+ deactivate server
9
+
10
+ Note right of browser: The browser reloads the page
11
+
12
+ browser->>server: GET https://studies.cs.helsinki.fi/exampleapp/notes
13
+ activate server
14
+ server-->>browser: HTML document
15
+ deactivate server
16
+
17
+ browser->>server: GET https://studies.cs.helsinki.fi/exampleapp/main.css
18
+ activate server
19
+ server-->>browser: the css file
20
+ deactivate server
21
+
22
+ browser->>server: GET https://studies.cs.helsinki.fi/exampleapp/main.js
23
+ activate server
24
+ server-->>browser: the JavaScript file
25
+ deactivate server
26
+
27
+ Note right of browser: The browser starts executing the JavaScript code that fetches the JSON from the server
28
+
29
+ browser->>server: GET https://studies.cs.helsinki.fi/exampleapp/data.json
30
+ activate server
31
+ server-->>browser: [{ "content": "HTML is easy", "date": "2023-1-1" }, ... ]
32
+ deactivate server
33
+
34
+ Note right of browser: The browser executes the callback function that renders the notes
Original file line number Diff line number Diff line change
1
+ sequenceDiagram
2
+ participant browser
3
+ participant server
4
+
5
+ browser->>server: GET https://studies.cs.helsinki.fi/exampleapp/spa
6
+ activate server
7
+ server-->>browser: HTML document
8
+ deactivate server
9
+
10
+ browser->>server: GET https://studies.cs.helsinki.fi/exampleapp/main.css
11
+ activate server
12
+ server-->>browser: the css file
13
+ deactivate server
14
+
15
+ browser->>server: GET https://studies.cs.helsinki.fi/exampleapp/spa.js
16
+ activate server
17
+ server-->>browser: the JavaScript file
18
+ deactivate server
19
+
20
+ Note right of browser: The browser starts executing the JavaScript code that fetches the JSON from the server
21
+
22
+ browser->>server: GET https://studies.cs.helsinki.fi/exampleapp/data.json
23
+ activate server
24
+ server-->>browser: [{ "content": "HTML is easy", "date": "2023-1-1" }, ... ]
25
+ deactivate server
26
+
27
+ Note right of browser: The browser executes the callback function that renders the notes
Original file line number Diff line number Diff line change
1
+ sequenceDiagram
2
+ participant browser
3
+ participant server
4
+
5
+ browser->>server: POST https://studies.cs.helsinki.fi/exampleapp/new_note_spa
6
+ activate server
7
+ server-->>browser: correctly made note
8
+ deactivate server
9
+
10
+ Note right of browser: The browser sends the note to the server and dynamicly updates itself instead of reloading
You can’t perform that action at this time.
0 commit comments