From 1f1423fdb8d4e2928768ffa33a6ad2b59c75e82e Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Sat, 23 Nov 2024 11:30:28 +0100 Subject: lowercase dirs --- zettelkast/Notes/290220241412 - Service Layer.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 zettelkast/Notes/290220241412 - Service Layer.md (limited to 'zettelkast/Notes/290220241412 - Service Layer.md') 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 -- cgit v1.2.3