summaryrefslogtreecommitdiff
path: root/Zettelkast/Notes/290220241412 - Service Layer.md
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2024-08-21 16:22:08 +0200
committerJasper Ras <jras@hostnet.nl>2024-08-21 16:22:08 +0200
commitf3711a93832df46dc245075df08b9ebfc05266e9 (patch)
tree167c4c4a9bedd6b94392b20eb6e68bc38656d456 /Zettelkast/Notes/290220241412 - Service Layer.md
parent26b2ee8fe95026e84bd1721910d575db72cc1b3f (diff)
forgot to commit for a while
Diffstat (limited to 'Zettelkast/Notes/290220241412 - Service Layer.md')
-rw-r--r--Zettelkast/Notes/290220241412 - Service Layer.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/Zettelkast/Notes/290220241412 - Service Layer.md b/Zettelkast/Notes/290220241412 - Service Layer.md
new file mode 100644
index 0000000..08e9782
--- /dev/null
+++ b/Zettelkast/Notes/290220241412 - Service Layer.md
@@ -0,0 +1,3 @@
+The idea of the service layer is that it handles most orchestration concerns for a use case of the application such as wiring together repositories and fetching required domain models. Basically it sets everything up so that we have everything needed to have the domain do its work properly and then persist the changes.
+
+This takes away this kind of logic from the entrypoints like API controllers making those easier to test as they only be concerned with doing web stuff, e.g fetching the data from the request and making sure we form a correct response. That allows us to just run an end to end test for the happy an all unhappy paths on the controller, the rest of the application functionality is covered by the service layer. \ No newline at end of file