From b773d4c2d046a222dddd56b80a954e84c88a2714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fern=C3=A1ndez=20Noriega?= Date: Sun, 18 Feb 2024 17:21:10 +0100 Subject: [PATCH] Point 5 of the documentation written and point 3 updated --- docs/src/03_system_scope_and_context.adoc | 18 ++- docs/src/05_building_block_view.adoc | 150 +++++++++++----------- 2 files changed, 85 insertions(+), 83 deletions(-) diff --git a/docs/src/03_system_scope_and_context.adoc b/docs/src/03_system_scope_and_context.adoc index 340402a..9c79942 100644 --- a/docs/src/03_system_scope_and_context.adoc +++ b/docs/src/03_system_scope_and_context.adoc @@ -52,18 +52,16 @@ The title of the table is the name of your system, the three columns contain the ---- actor Player actor Client -database MongoDB <> -[WIQ Game] <> [Wikidata] <> -[UsersInfoAPI] <> + +[WIQ Game] <> +[UsersAPI] <> [GeneratedQuestionsAPI] <> -Player .> (WIQ Game) : login -Client ..> (UsersInfoAPI) -Client ..> (GeneratedQuestionsAPI) -MongoDB --> (UsersInfoAPI) -MongoDB --> (GeneratedQuestionsAPI) -[WIQ Game] <.> (Wikidata) : WikidataAPI -[WIQ Game] <--> (MongoDB) +Player ..> (WIQ Game) : register/login +Client ..> (WIQ Game) : view data +[GeneratedQuestionsAPI] ..> Wikidata +[WIQ Game] ..> UsersAPI +[WIQ Game] ..> GeneratedQuestionsAPI ---- [cols="e,2e" options="header"] diff --git a/docs/src/05_building_block_view.adoc b/docs/src/05_building_block_view.adoc index df5c29c..036ba49 100644 --- a/docs/src/05_building_block_view.adoc +++ b/docs/src/05_building_block_view.adoc @@ -63,18 +63,53 @@ In the best case you will get away with examples or simple signatures. **** -_****_ +[plantuml,"White box overall system",png] +---- +actor Player +actor Client +[Wikidata] + +rectangle "WIQ Game (Level 1)"{ +[WIQ Game GUI] +[Data View] +[UsersAPI] +[GeneratedQuestionsAPI] #BurlyWood +Player ..> (WIQ Game GUI) +Client ..> (Data View) +[GeneratedQuestionsAPI] ..> Wikidata +[WIQ Game GUI] ..> UsersAPI +[WIQ Game GUI] ..> GeneratedQuestionsAPI +[Data View] ..> UsersAPI +[Data View] ..> GeneratedQuestionsAPI +} +---- Motivation:: -__ +We made the decomposition separating the functionallities (The names are self explanatory but components will be described later) +Contained Black boxes:: -Contained Building Blocks:: -__ +[cols="e,2e" options="header"] +|=== +|Name |Responsibility + +|WIQ Game GUI +|Main window in which questions are shown and can be answered by the player. The latter can also see past scores. + +|Data View +|Access to data about users and generated questions for the client. + +|Generated Questions API +|In charge of generating the questions and storing their data + +|UsersAPI +|In charge of keeping track of the data of the users (registration and scores) + +|Wikidata +|External element used for the generation of questions -Important Interfaces:: -__ +|=== [role="arc42help"] **** @@ -97,8 +132,6 @@ Its headline is the name of the black box. **** -==== - [role="arc42help"] **** Here you describe @@ -113,37 +146,6 @@ according the the following black box template: **** -__ - -__ - -_<(Optional) Quality/Performance Characteristics>_ - -_<(Optional) Directory/File Location>_ - -_<(Optional) Fulfilled Requirements>_ - -_<(optional) Open Issues/Problems/Risks>_ - - - - -==== - -__ - -==== - -__ - - -==== - -... - -==== - - === Level 2 @@ -156,57 +158,59 @@ Please prefer relevance over completeness. Specify important, surprising, risky, Leave out normal, simple, boring or standardized parts of your system **** -==== White Box __ +==== Generated Questions API (White Box) [role="arc42help"] **** ...describes the internal structure of _building block 1_. **** -__ - -==== White Box __ - - -__ - -... - -==== White Box __ - - -__ - +[plantuml,"Generated Questions API (White Box)",png] +---- +[Wikidata] +[wikidatanpm] <> +[WIQ Game GUI] +[Data View] +database MongoDB +rectangle "GenedQuestsAPI (Level 2)"{ -=== Level 3 +[GenQuestsService] ..> wikidatanpm +[GenQuestsService] ..> Wikidata +[GenQuestsService] <--> MongoDB +[WIQ Game GUI] ..> GenQuestsService : new Question +[Data View] ..> GenQuestsService : get Questions +} +---- -[role="arc42help"] -**** -Here you can specify the inner structure of (some) building blocks from level 2 as white boxes. - -When you need more detailed levels of your architecture please copy this -part of arc42 for additional levels. -**** +Motivation:: +We made the decomposition separating the functionallities. -==== White Box <_building block x.1_> - -[role="arc42help"] -**** -Specifies the internal structure of _building block x.1_. -**** +Contained Black boxes:: +[cols="e,2e" options="header"] +|=== +|Name |Responsibility -__ +|GenQuestsService +|Receives different petitions regarding the generation of questions or their retrieval and responds accordingly. +|wikidatanpm +|External library that facilitates and simplifies the use of wikidata for the generation of questions. -==== White Box <_building block x.2_> +|MongoDB +|The data of the generated questions is stored here for showing it later to the client. -__ +|=== +Additional explanation of relationships:: +The service is requested either the generation of a question or the retrieval of a subset (from WIQ Game GUI or +Data View respectively). -==== White Box <_building block y.1_> +For the first case, it makes use of the library to generate the question, retrieves it +for the interface to use and stores the pertinent data in the DB. -__ +In the other case, it just makes the query according to the client choosings and retrieves the data of the +questions for the Data View to show. \ No newline at end of file