asp.net mvc应用程序改进效率建议。

时间:2021-09-09 05:57:04

Please can any body provide me suggestions for standards that you feel are necessary or are areas where effciency/maintenance would improve through standardization.

请任何机构为您认为必要的标准或通过标准化提高效率/维护的领域提供建议。

Like GUI,Controller,Repository.

像GUI、控制器、存储库。

Any ideas reagrding ViewModels can be specified under the Controller section? if we place any good results?

在Controller部分可以指定任何重新编排视图模型的想法吗?如果我们有什么好的结果?

Thanks

谢谢

1 个解决方案

#1


2  

The simple fact is that each shop is its own and has its own personalities that prefer to code a certain way. If you search google code or gitbut for Repository.cs or RepositoryBase.cs you'll fine 100 different implementations of the same pattern! Don't even get me started on what people thing belongs in the ControllerBase.cs or not.

简单的事实是,每家商店都有自己的特色,它们更喜欢用某种方式编码。如果您搜索谷歌代码或gitbut作为存储库。cs或RepositoryBase。cs您将罚款100个不同的实现相同的模式!不要让我知道控制基座里的人是什么。cs。

There is also a huge difference between different types of projects. Intranet style apps with MVC are completely different from large scale web applications. Service layers vs direct db queries, NoSql vs traditional SQL approaches, domain driven design vs persistence direct apps, FluentVal vs DataAnnotations.

不同类型的项目也有很大的不同。具有MVC的内部网风格应用程序与大型web应用程序完全不同。服务层vs直接db查询,NoSql vs传统SQL方法,领域驱动设计vs持久性直接应用,FluentVal vs dataannotation。

My answer is there is no answer. Do what works for you, makes the most sense to the team your own and keeps your code clean and flexible.

我的答案是没有答案。做对你有用的,对团队来说最有意义的事情,保持代码的整洁和灵活。

#1


2  

The simple fact is that each shop is its own and has its own personalities that prefer to code a certain way. If you search google code or gitbut for Repository.cs or RepositoryBase.cs you'll fine 100 different implementations of the same pattern! Don't even get me started on what people thing belongs in the ControllerBase.cs or not.

简单的事实是,每家商店都有自己的特色,它们更喜欢用某种方式编码。如果您搜索谷歌代码或gitbut作为存储库。cs或RepositoryBase。cs您将罚款100个不同的实现相同的模式!不要让我知道控制基座里的人是什么。cs。

There is also a huge difference between different types of projects. Intranet style apps with MVC are completely different from large scale web applications. Service layers vs direct db queries, NoSql vs traditional SQL approaches, domain driven design vs persistence direct apps, FluentVal vs DataAnnotations.

不同类型的项目也有很大的不同。具有MVC的内部网风格应用程序与大型web应用程序完全不同。服务层vs直接db查询,NoSql vs传统SQL方法,领域驱动设计vs持久性直接应用,FluentVal vs dataannotation。

My answer is there is no answer. Do what works for you, makes the most sense to the team your own and keeps your code clean and flexible.

我的答案是没有答案。做对你有用的,对团队来说最有意义的事情,保持代码的整洁和灵活。