This pull request creates a new architecture for the web-api.
Before this pull request all folders were contained in a single project, resulting in a difficult-to-comprehend communication between the folders.
The new structure introduces a total of 4 projects: API, Service, Repository and Entities. The new architecture is based on N-tier Layered Architecture
API contains the controllers/endpoints, which the frontend communicates with.
Service contains the business logic of the backend.
Repository contains all communication with the database.
Entities are all the models, both the Data Transfer Obejcts, the EF entities, and the classes.
The dependencies between the projects may only go downward, in the list above, i.e. API can reference all other projects, but none of these may reference the API project.
A part of this restructure was splitting up methods from classes, to satisfy the above description, and in general move functions.
Fixes #326
Type of change
[X] Refactoring
[X] This change requires a documentation update
How Has This Been Tested?
All endpoints are tested through Swagger.
After all testcases are refactored to the new architecture, they are executed and passes.
The emulator have been used thoroughly to try and crash the application with the new architecture.
The version of the weekplaner tested against, is the one from the beginning of the semester, i.e. changes from this semester has not been tested against.
Testcases have been run on the following OSs:
Windows 10
Windows 11
Ubuntu 22.04
Mac OS 14.1
NixOS 24.05pre
Development Configuration
.NET 8.0
Definition of Done
[X] All endpoints must be tested to ensure the new architecture is functional.
This can systematically be accomplished through Swagger.
[X] All test cases, both unit and integration, must pass under the new architecture.
[X] The application must be rigorously tested to ensure features are working as before.
Description
This pull request creates a new architecture for the web-api. Before this pull request all folders were contained in a single project, resulting in a difficult-to-comprehend communication between the folders.
The new structure introduces a total of 4 projects: API, Service, Repository and Entities. The new architecture is based on N-tier Layered Architecture
The dependencies between the projects may only go downward, in the list above, i.e. API can reference all other projects, but none of these may reference the API project.
A part of this restructure was splitting up methods from classes, to satisfy the above description, and in general move functions.
Fixes #326
Type of change
How Has This Been Tested?
All endpoints are tested through Swagger. After all testcases are refactored to the new architecture, they are executed and passes. The emulator have been used thoroughly to try and crash the application with the new architecture.
Testcases have been run on the following OSs:
Development Configuration .NET 8.0
Definition of Done