I have visual studio solution including an ASP.NET MVC and WCF hosting projects. Also, have Service.cs, Engine.cs, Repository.cs classe(s) behind ServiceName.svc boundary.
My question is about organization of folders thus file names on each layer. For instance, i have a Settings page where user updates his full name, address and phone number. I have two options to follow:
1- AccountController.cs (/settings action) -> AccountService.svc -> AccountService.cs (UpdateFullName() operation) -> AccountEngine.cs (updateFullName() method) -> AccountRepository.cs -> SQL Server
or
2- SettingsController.cs (/home action) -> SettingsService.svc(UpdateFullName() operation) -> SettingsService.cs -> SettingsEngine.cs (updateFullName() method) -> AccountRepository.cs -> SQL Server
Would be glad to receive your insights and recommendations, i know about organization by functional cohesion and about DDD but still did not get to the point where i have a pattern clear in my mind to follow and consider it as best practice and apply it to all projects.
Aucun commentaire:
Enregistrer un commentaire