Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add each feature in a file to represent the vertical slice #187

Closed
MrDave1999 opened this issue Apr 22, 2023 · 1 comment · Fixed by #200
Closed

Add each feature in a file to represent the vertical slice #187

MrDave1999 opened this issue Apr 22, 2023 · 1 comment · Fixed by #200
Labels
breaking change A change in one part of a software that potentially causes other components to fail structure Issue or pull request related to project structure
Milestone

Comments

@MrDave1999
Copy link
Member

MrDave1999 commented Apr 22, 2023

Example:

In the Dependents module there would be four files representing the vertical slice:

  • CreateDependent.cs
  • DeleteDependent.cs
  • UpdateDependent.cs
  • GetDependentsByUserId.cs

Each file represents a feature and in it are the related components such as the use case, mapper, validator and the DTOs (request/response).

@MrDave1999 MrDave1999 added high priority structure Issue or pull request related to project structure labels Apr 22, 2023
@MrDave1999 MrDave1999 changed the title Added each feature in a file to represent the vertical slice Add each feature in a file to represent the vertical slice Apr 22, 2023
@MrDave1999 MrDave1999 added the refactor Refactoring existing code, to make it more readable, cleaner or more efficient label Jul 16, 2023
@MrDave1999 MrDave1999 added this to the v1.0.0-alpha.10 milestone Jul 16, 2023
@MrDave1999
Copy link
Member Author

MrDave1999 commented Jul 28, 2023

If the namespace is named DentallApp.Features.Dependents, then it is redundant for its vertical slices to be named CreateDependent, DeleteDependent, etc.

The files can be called:

  • Create.cs
  • Delete.cs
  • Update.cs
  • GetByUserId.cs

@MrDave1999 MrDave1999 added breaking change A change in one part of a software that potentially causes other components to fail and removed refactor Refactoring existing code, to make it more readable, cleaner or more efficient labels Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A change in one part of a software that potentially causes other components to fail structure Issue or pull request related to project structure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant