-
Notifications
You must be signed in to change notification settings - Fork 16
Application
This organization allows an easy understanding for new team members or future maintenance on the code.
We follow the whole Agile philosophy and understand that UML documents do not fit what we preach, but when we talk about Use case here we are taking a system action to the user level to avoid communication noise between developers and users. That is, a user can say that a validation needs to be changed when a customer Sells stock that will be easy for the developer to understand and find this in the code.
We have here a clear separation based on use cases in both the API and the Application layer. So the developer will be able to easily find the code that should be changed or created.
In the use case's folder structure we establish the borders and consequently put everything related to that border inside the folder.
The ports allow the application of communication with the external world in an abstract way.
Adapters are the concrete implementation of the port.
The example of the input adapter follows. It provides the necessary data for the Use case to perform an action and validates the input before reaching the use case.
The interface IUseCaseInput is the port and BuyStockInput is the adapter
public sealed class BuyStockInput : IUseCaseInput