6:42 I DO like the idea of not duplicating based on context because then I don't have to have unnecessarily long names. The fact that you have many names that are the same (like Request) in different folders makes it easy to know what it's doing and it's easier to implement a naming convention. A big selling point of vertical slice architecture is that you're mostly only working on one feature at a time so smaller class names is easief to understand. Having said that it would be better if the IDE could be set up for someone who wants to do VSA. Thanks for the video
Thanks a lot Gui, awesome as usual 👍 I have a question about Clean architecture and file upload, Is it ok if used IFormFile in Application project as a parameter in the IRequest class/record public record CreateArticleRequest(string Title, string Content, IFormFile ThumbnailImage) : IRequest; or create a custom class and map IFormFile to it in the controller public record CreateArticleRequest(string Title, string Content, FileUploader ThumbnailImage) : IRequest; public async Task CreateArticle([FromForm]CreateArticleRequest command,[FromForm] IFormFile formFile) { command.FileUpoader = formFile.MapToFileUploader(); //... } or you have a better approach ?
6:42 I DO like the idea of not duplicating based on context because then I don't have to have unnecessarily long names. The fact that you have many names that are the same (like Request) in different folders makes it easy to know what it's doing and it's easier to implement a naming convention. A big selling point of vertical slice architecture is that you're mostly only working on one feature at a time so smaller class names is easief to understand. Having said that it would be better if the IDE could be set up for someone who wants to do VSA.
Thanks for the video
how would you handle when one feature talks to another do you call them directly or duplicate the code?
Abstract it into a common service
Thanks a lot Gui, awesome as usual 👍
I have a question about Clean architecture and file upload, Is it ok if used IFormFile in Application project as a parameter in the IRequest class/record
public record CreateArticleRequest(string Title, string Content, IFormFile ThumbnailImage) : IRequest;
or create a custom class and map IFormFile to it in the controller
public record CreateArticleRequest(string Title, string Content, FileUploader ThumbnailImage) : IRequest;
public async Task CreateArticle([FromForm]CreateArticleRequest command,[FromForm] IFormFile formFile)
{
command.FileUpoader = formFile.MapToFileUploader();
//...
}
or you have a better approach ?
video start at 3:00