From 81367af532e67ff539b69d1c44a7c136dbe2e43a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Balc=C3=A1rek?= Date: Fri, 22 Mar 2024 13:35:22 +0100 Subject: [PATCH] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8ba41ee..3df0369 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Example API allows to get actual/forecast weather data by location from [Weather * [Comparsion of Vertical Slice Architecture and Clean Architecture](#comparsion-of-vertical-slice-architecture-and-clean-architecture) - [Pull Request of new CRUD endpoint](#pull-request-of-new-crud-endpoint) - [Unit Testing](#unit-testing) - - [Comparsion Conclusion](#comparsion-conclusion) + - [Final Thoughts](#final-thoughts) * [Hybrid Approaches](#hybrid-approaches) * [Conclusion](#conclusion) * [Technologies](#technologies) @@ -68,7 +68,7 @@ Based on the PR comparison, we can also see that VSA is well-suited for tiny or ### Unit Testing In CA, unit testing is easy thanks to the high level of abstractions. However, as the project grows, it can result in a lot of repetitive work. Fortunately, with the support of AI, this issue can be alleviated. In VSA, it depends. When we look at this example, everything is within the handler (business logic, access to the database). Therefore, for growing project, this is not a good approach because writing and maintaining unit tests can become increasingly difficult even for the AI. But for this simple example, it fits well. -### Comparsion Conclusion +### Final Thoughts In comparison, VSA resolves the issue of CA by touching all layers for just one feature. However, on the other hand, there is a risk of code duplication which CA reduces by splitting the code into layers and then into reusable services. Unit testing is easier and cleaner in CA, but it results in repetition. Unit testing in VSA could be difficult in cases when we put too much logic into one file. The solution for these issues can be to create a hybrid of both architectures. ## Hybrid Approaches