From fd0a6fc28ccae9e1e3303c8347a28d4ca1f8dd98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hallvard=20Tr=C3=A6tteberg?= <hal@ntnu.no>
Date: Wed, 18 Nov 2020 12:09:07 +0000
Subject: [PATCH] =?UTF-8?q?Fikset=20st=C3=B8tte=20for=20plantuml=20og=20op?=
 =?UTF-8?q?prettet=20(tomme)=20delkapitler.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 todolist/architecture.puml                    | 73 +++++++++++++++++++
 todolist/asciidocs/docs/README.adoc           | 23 +++++-
 todolist/asciidocs/docs/core.adoc             |  1 +
 todolist/asciidocs/docs/fxui.adoc             |  1 +
 todolist/asciidocs/docs/integrationtests.adoc |  1 +
 todolist/asciidocs/docs/restapi.adoc          |  1 +
 .../asciidocs/docs/springboot-restapi.adoc    |  1 +
 7 files changed, 98 insertions(+), 3 deletions(-)
 create mode 100644 todolist/architecture.puml
 create mode 100644 todolist/asciidocs/docs/core.adoc
 create mode 100644 todolist/asciidocs/docs/fxui.adoc
 create mode 100644 todolist/asciidocs/docs/integrationtests.adoc
 create mode 100644 todolist/asciidocs/docs/restapi.adoc
 create mode 100644 todolist/asciidocs/docs/springboot-restapi.adoc

diff --git a/todolist/architecture.puml b/todolist/architecture.puml
new file mode 100644
index 0000000..ba5384b
--- /dev/null
+++ b/todolist/architecture.puml
@@ -0,0 +1,73 @@
+@startuml architecture
+
+component core {
+	package todolist.core
+	package todolist.json
+}
+
+component jackson {
+}
+
+todolist.json ..> jackson
+
+component fxutil {
+}
+
+component fxui {
+	package todolist.ui
+}
+
+
+todolist.ui ..> todolist.core
+todolist.ui ..> todolist.json
+
+component javafx {
+	component fxml {
+	}
+}
+
+fxui ..> javafx
+fxui ..> fxml
+fxui ..> fxutil
+
+component restapi {
+	package todolist.restapi
+}
+
+todolist.restapi ..> todolist.core
+
+component jaxrs {
+}
+
+restapi ..> jaxrs
+
+component restserver {
+	package todolist.restserver
+}
+
+todolist.restserver ..> todolist.core
+todolist.restserver ..> todolist.json
+todolist.restserver ..> todolist.restapi
+
+component jersey {
+}
+
+component grizzly2 {
+}
+
+restserver ..> jersey
+restserver ..> grizzly2
+
+component "springboot/restserver" as springboot.restserver {
+	package todolist.springboot.restserver
+}
+
+todolist.springboot.restserver ..> todolist.core
+todolist.springboot.restserver ..> todolist.json
+
+component "spring boot" as springboot {
+}
+
+springboot.restserver ..> springboot
+
+@enduml
\ No newline at end of file
diff --git a/todolist/asciidocs/docs/README.adoc b/todolist/asciidocs/docs/README.adoc
index 9c85222..9bf7f79 100644
--- a/todolist/asciidocs/docs/README.adoc
+++ b/todolist/asciidocs/docs/README.adoc
@@ -3,13 +3,31 @@
 == Forord
 
 Denne modulen i todo-list-eksemplet inneholder dokumentasjon tenkt brukt som læringsmateriell,
-ikke vanlig doumentasjon rettet mot utviklere av den typen en forventer i tilsvarende prosjekter.
+ikke vanlig dokumentasjon rettet mot utviklere av den typen en forventer i tilsvarende prosjekter.
 
 Dokumentasjonen er skrevet med https://asciidoctor.org/[Asciidoctor] og
 bygget med image:maven-logo-black-on-white.png[Maven logo,60,link="https://maven.apache.org/"]
 
 == Introduksjon
 
+Todo-list er en applikasjon for håndtering av todo-lister.
+Den er implementert som en kombinasjon av en JavaFX-app og et REST API som appen bruker for håndtering av data.
+Med et REST API adskilt fra appen, så er det lett å utvide med andre klienter,
+f.eks. en "native"-app for Android eller web-klient basert på React.
+
+== Modularisering
+
+Todolist er strukturert i et sett _moduler_. Domenelogikken ligger i core-modulen, appen i fxui (og fxutil),
+mens REST API-et er fordelt over to moduler, restapi og restserver (og en alternativ implementasjon i springboot/restserver):
+
+- <<core.adoc#, core>> - domenelogikken med alle klassene for å representeree todo-lister og -elementer, og støtte for serialisering og derialisering som JSON med Jackson-biblioteket
+- <<fxui.adoc#, fxui (og fxutil)>> - app-brukergrensesnitt basert på JavaFX og FXML
+- <<restapi.adoc#, restapi og restserver>> - REST API og server basert på JAX-RS-standarden og Jersey-implementasjonen
+- <<springboot-restapi.adoc#, springboot/restserver>> - _alternativ_ REST API og server basert på spring boot-rammeverket
+- <<integrationtests.adoc#, integrationtests>> - (integrasjons)test for app koblet til REST-serveren
+
+Disse forklares i hver sine kapitler. Under viser et _pakkediagram_ strukturen av moduler og pakker og deres avhengigheter.
+
 [plantuml]
 ....
 component core {
@@ -23,7 +41,6 @@ component jackson {
 todolist.json ..> jackson
 
 component fxutil {
-	package todolist.ui
 }
 
 component fxui {
@@ -44,7 +61,7 @@ fxui ..> fxml
 fxui ..> fxutil
 
 component restapi {
-	package simpleex.restapi
+	package todolist.restapi
 }
 
 todolist.restapi ..> todolist.core
diff --git a/todolist/asciidocs/docs/core.adoc b/todolist/asciidocs/docs/core.adoc
new file mode 100644
index 0000000..ef8f1bb
--- /dev/null
+++ b/todolist/asciidocs/docs/core.adoc
@@ -0,0 +1 @@
+== Kjernelogikken
diff --git a/todolist/asciidocs/docs/fxui.adoc b/todolist/asciidocs/docs/fxui.adoc
new file mode 100644
index 0000000..4e9fe4e
--- /dev/null
+++ b/todolist/asciidocs/docs/fxui.adoc
@@ -0,0 +1 @@
+== Appen
diff --git a/todolist/asciidocs/docs/integrationtests.adoc b/todolist/asciidocs/docs/integrationtests.adoc
new file mode 100644
index 0000000..4e79efe
--- /dev/null
+++ b/todolist/asciidocs/docs/integrationtests.adoc
@@ -0,0 +1 @@
+== Integrasjonstest for app og REST API
diff --git a/todolist/asciidocs/docs/restapi.adoc b/todolist/asciidocs/docs/restapi.adoc
new file mode 100644
index 0000000..5ab8cfd
--- /dev/null
+++ b/todolist/asciidocs/docs/restapi.adoc
@@ -0,0 +1 @@
+== REST API
diff --git a/todolist/asciidocs/docs/springboot-restapi.adoc b/todolist/asciidocs/docs/springboot-restapi.adoc
new file mode 100644
index 0000000..5c4a050
--- /dev/null
+++ b/todolist/asciidocs/docs/springboot-restapi.adoc
@@ -0,0 +1 @@
+== REST API med Spring boot-rammeverket
-- 
GitLab