Skip to content

Application

Alexandre Simões edited this page Feb 23, 2020 · 6 revisions

Use Case

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.

Use Cases

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.

usecase code

Structure

In the use case's folder structure we establish the borders and consequently put everything related to that border inside the folder.

code

Ports and Adapters

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

Clone this wiki locally