From 102c10e4e773dbf8af5a9b84735d7a9cb71c1559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Garc=C3=ADa=20Mart=C3=ADnez?= <124291125+uo289097@users.noreply.github.com> Date: Mon, 5 Feb 2024 10:53:32 +0100 Subject: [PATCH 1/9] Inicio 06_runtime_view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Comienzo del apartado 6 de la documentación --- docs/src/06_runtime_view.adoc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/src/06_runtime_view.adoc b/docs/src/06_runtime_view.adoc index e10f375b..dd713aaf 100644 --- a/docs/src/06_runtime_view.adoc +++ b/docs/src/06_runtime_view.adoc @@ -2,9 +2,16 @@ ifndef::imagesdir[:imagesdir: ../images] [[section-runtime-view]] == Runtime View +=== Login +For the login, the app shows the login view, which asks the user for his username and his password. -[role="arc42help"] +Then, the app does a login request to the REST API server, which redirect the user to the identity provider, which handles the authentication. + +If the login is succesfully, ... +In case the login isn't succesfully, a warning message is shown. + +== ESTRUCTURA **** .Contents The runtime view describes concrete behavior and interactions of the system’s building blocks in form of scenarios from the following areas: From 30637f5d7334cb3d31048cf9f79514520c94b74b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Garc=C3=ADa=20Mart=C3=ADnez?= <124291125+uo289097@users.noreply.github.com> Date: Sun, 18 Feb 2024 17:06:10 +0100 Subject: [PATCH 2/9] Update 06_runtime_view.adoc --- docs/src/06_runtime_view.adoc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/src/06_runtime_view.adoc b/docs/src/06_runtime_view.adoc index dd713aaf..af3ee28b 100644 --- a/docs/src/06_runtime_view.adoc +++ b/docs/src/06_runtime_view.adoc @@ -6,12 +6,25 @@ ifndef::imagesdir[:imagesdir: ../images] For the login, the app shows the login view, which asks the user for his username and his password. -Then, the app does a login request to the REST API server, which redirect the user to the identity provider, which handles the authentication. +Then, the app does a login request to the users microservice, which redirect the user to the identity provider, which handles the authentication. -If the login is succesfully, ... +If the login is succesfully, the app shows the different options of the game. In case the login isn't succesfully, a warning message is shown. -== ESTRUCTURA +=== Game + +=== Ranking + +=== History + +In this view, the user can watch this options: + +- Number of games played +- Best times +- Correct/incorrect questions + + += ESTRUCTURA **** .Contents The runtime view describes concrete behavior and interactions of the system’s building blocks in form of scenarios from the following areas: From c121049e8cf634cee8460c3ca6ff772b98c3773e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Garc=C3=ADa=20Mart=C3=ADnez?= <124291125+uo289097@users.noreply.github.com> Date: Sun, 18 Feb 2024 17:09:37 +0100 Subject: [PATCH 3/9] Update 06_runtime_view.adoc --- docs/src/06_runtime_view.adoc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/src/06_runtime_view.adoc b/docs/src/06_runtime_view.adoc index af3ee28b..4705f1a6 100644 --- a/docs/src/06_runtime_view.adoc +++ b/docs/src/06_runtime_view.adoc @@ -14,9 +14,13 @@ In case the login isn't succesfully, a warning message is shown. === Game === Ranking +In this view, the user can watch different rankings: -=== History +- Ordered by accuracy percentage +- Ordered by number of questions answered correctly +- Ordered by quantity of game rounds +=== History In this view, the user can watch this options: - Number of games played From 2a56e7a0e544c7bb90afe3cac4b40d70d0714a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Garc=C3=ADa=20Mart=C3=ADnez?= <124291125+uo289097@users.noreply.github.com> Date: Sun, 18 Feb 2024 17:16:46 +0100 Subject: [PATCH 4/9] Update 06_runtime_view.adoc --- docs/src/06_runtime_view.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/src/06_runtime_view.adoc b/docs/src/06_runtime_view.adoc index 4705f1a6..d5e575da 100644 --- a/docs/src/06_runtime_view.adoc +++ b/docs/src/06_runtime_view.adoc @@ -13,6 +13,9 @@ In case the login isn't succesfully, a warning message is shown. === Game +When the user starts a game, the app generates a question and request the correct answer to the WikiData API. When the user choose a posible answer, the app checks if it is the correct answer. Then, this process is repeated until the end of the game. + + === Ranking In this view, the user can watch different rankings: From b72edd5db43c70895ff39fa9bbc2ccc33b2a4141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Garc=C3=ADa=20Mart=C3=ADnez?= <124291125+uo289097@users.noreply.github.com> Date: Sun, 18 Feb 2024 17:33:50 +0100 Subject: [PATCH 5/9] Update 06_runtime_view.adoc --- docs/src/06_runtime_view.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/06_runtime_view.adoc b/docs/src/06_runtime_view.adoc index d5e575da..a96070b2 100644 --- a/docs/src/06_runtime_view.adoc +++ b/docs/src/06_runtime_view.adoc @@ -24,7 +24,7 @@ In this view, the user can watch different rankings: - Ordered by quantity of game rounds === History -In this view, the user can watch this options: +In this view, the user can watch this options about his past games: - Number of games played - Best times From f35ef8dcf515f00b9d14d7241cd940d3b41bc870 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Garc=C3=ADa=20Mart=C3=ADnez?= <124291125+uo289097@users.noreply.github.com> Date: Sun, 18 Feb 2024 18:00:35 +0100 Subject: [PATCH 6/9] Update 06_runtime_view.adoc --- docs/src/06_runtime_view.adoc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/src/06_runtime_view.adoc b/docs/src/06_runtime_view.adoc index a96070b2..332e2d0f 100644 --- a/docs/src/06_runtime_view.adoc +++ b/docs/src/06_runtime_view.adoc @@ -11,6 +11,31 @@ Then, the app does a login request to the users microservice, which redirect the If the login is succesfully, the app shows the different options of the game. In case the login isn't succesfully, a warning message is shown. +[plantuml,"sequencediagram-login",png] +---- +actor User as u +participant "Web App" as w +participant "User Microservice" as um +activate w +w -> w: Show Login View +u -> w: Chooses Identity +w -> um: Requests login +deactivate w +activate um +um -> um: Redirects to the provider login form +um --> u: Asks for credentials +deactivate um +activate u +u -> um: Logs in +deactivate u +activate um +um --> um: Provides session information +um --> w: Provides session ID +deactivate um +activate w +w -> w: Show Main View +deactivate um +---- === Game When the user starts a game, the app generates a question and request the correct answer to the WikiData API. When the user choose a posible answer, the app checks if it is the correct answer. Then, this process is repeated until the end of the game. From 706f329ef668a50938007981dcf8a94065e9de7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Garc=C3=ADa=20Mart=C3=ADnez?= <124291125+uo289097@users.noreply.github.com> Date: Sun, 18 Feb 2024 18:25:43 +0100 Subject: [PATCH 7/9] Update 06_runtime_view.adoc --- docs/src/06_runtime_view.adoc | 95 +++++++++++++---------------------- 1 file changed, 35 insertions(+), 60 deletions(-) diff --git a/docs/src/06_runtime_view.adoc b/docs/src/06_runtime_view.adoc index 332e2d0f..460ec3cc 100644 --- a/docs/src/06_runtime_view.adoc +++ b/docs/src/06_runtime_view.adoc @@ -33,14 +33,41 @@ um --> um: Provides session information um --> w: Provides session ID deactivate um activate w -w -> w: Show Main View +w -> w: Show Game View deactivate um ---- === Game When the user starts a game, the app generates a question and request the correct answer to the WikiData API. When the user choose a posible answer, the app checks if it is the correct answer. Then, this process is repeated until the end of the game. - +[plantuml,"sequencediagram-game",png] +---- +actor User as user +participant WebApp as app +participant GameMS as gameMS +participant WikiDataAPI as api + +activate app + +user -> app: Start game +app -> gameMS: Generate question +gameMS -> api: Request correct answer\nfor the generated question +api --> gameMS: Correct answer +gameMS -> app: +app -> user: Show question and options + +loop Until end of the game + user -> app: Choose possible answer + app -> gameMS: Verify answer\nselected by the user + gameMS --> app: Correct or incorrect answer + app -> user: Show result\nand current score +end + +user -> app: Finish game +app --> user: Show final score + +deactivate app +---- === Ranking In this view, the user can watch different rankings: @@ -48,6 +75,10 @@ In this view, the user can watch different rankings: - Ordered by number of questions answered correctly - Ordered by quantity of game rounds +[plantuml,"sequencediagram-ranking",png] +---- + +---- === History In this view, the user can watch this options about his past games: @@ -55,63 +86,7 @@ In this view, the user can watch this options about his past games: - Best times - Correct/incorrect questions - -= ESTRUCTURA -**** -.Contents -The runtime view describes concrete behavior and interactions of the system’s building blocks in form of scenarios from the following areas: - -* important use cases or features: how do building blocks execute them? -* interactions at critical external interfaces: how do building blocks cooperate with users and neighboring systems? -* operation and administration: launch, start-up, stop -* error and exception scenarios - -Remark: The main criterion for the choice of possible scenarios (sequences, workflows) is their *architectural relevance*. It is *not* important to describe a large number of scenarios. You should rather document a representative selection. - -.Motivation -You should understand how (instances of) building blocks of your system perform their job and communicate at runtime. -You will mainly capture scenarios in your documentation to communicate your architecture to stakeholders that are less willing or able to read and understand the static models (building block view, deployment view). - -.Form -There are many notations for describing scenarios, e.g. - -* numbered list of steps (in natural language) -* activity diagrams or flow charts -* sequence diagrams -* BPMN or EPCs (event process chains) -* state machines -* ... - - -.Further Information - -See https://docs.arc42.org/section-6/[Runtime View] in the arc42 documentation. - -**** - -=== - - -* __ -* __ - -It is possible to use a sequence diagram: - -[plantuml,"Sequence diagram",png] ----- -actor Alice -actor Bob -database Pod as "Bob's Pod" -Alice -> Bob: Authentication Request -Bob --> Alice: Authentication Response -Alice --> Pod: Store route -Alice -> Bob: Another authentication Request -Alice <-- Bob: another authentication Response +[plantuml,"sequencediagram-history",png] ---- -=== - -=== ... - -=== +---- From 6ae7bcd40ccee68177349c042d53b5ebe7e4d983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Garc=C3=ADa=20Mart=C3=ADnez?= <124291125+uo289097@users.noreply.github.com> Date: Sun, 18 Feb 2024 18:43:26 +0100 Subject: [PATCH 8/9] Update 06_runtime_view.adoc --- docs/src/06_runtime_view.adoc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/src/06_runtime_view.adoc b/docs/src/06_runtime_view.adoc index 460ec3cc..5d9856ad 100644 --- a/docs/src/06_runtime_view.adoc +++ b/docs/src/06_runtime_view.adoc @@ -77,7 +77,19 @@ In this view, the user can watch different rankings: [plantuml,"sequencediagram-ranking",png] ---- +actor User as user +participant HistoryMS as MS +participant MongoDB as db + +activate MS + +user -> MS: Request ranking +MS -> db: Asks for the ranking +db -> MS: Gives the ranking with the best +MS -> user: Shows the ranking + +deactivate MS ---- === History In this view, the user can watch this options about his past games: From 48cc104cef3d57c74af5826c57919c1dab3b2be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Garc=C3=ADa=20Mart=C3=ADnez?= <124291125+uo289097@users.noreply.github.com> Date: Sun, 18 Feb 2024 18:46:30 +0100 Subject: [PATCH 9/9] Update 06_runtime_view.adoc --- docs/src/06_runtime_view.adoc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/src/06_runtime_view.adoc b/docs/src/06_runtime_view.adoc index 5d9856ad..d6a953e1 100644 --- a/docs/src/06_runtime_view.adoc +++ b/docs/src/06_runtime_view.adoc @@ -78,7 +78,7 @@ In this view, the user can watch different rankings: [plantuml,"sequencediagram-ranking",png] ---- actor User as user -participant HistoryMS as MS +participant RankingMS as MS participant MongoDB as db activate MS @@ -100,5 +100,16 @@ In this view, the user can watch this options about his past games: [plantuml,"sequencediagram-history",png] ---- +actor User as user +participant HistoryMS as MS +participant MongoDB as db +activate MS + +user -> MS: Request history +MS -> db: Asks for the history +db -> MS: Gives the user's history +MS -> user: Shows the history + +deactivate MS ----