ASP.net MVC项目结构
发布时间:2020-12-15 20:14:50 所属栏目:asp.Net 来源:网络整理
导读:我已经为我的新的asp.net mvc项目创建了以下项目结构,我曾经有一些反馈意见,如其他人如何构建他们的项目,如果我会改进我的… 这是我到目前为止 +Assets-+Images -+Scripts -+Stylesheets -+... 'More things like the above here+Controllers -+Support--+Ac
我已经为我的新的asp.net mvc项目创建了以下项目结构,我曾经有一些反馈意见,如其他人如何构建他们的项目,如果我会改进我的…
这是我到目前为止 +Assets -+Images -+Scripts -+Stylesheets -+... 'More things like the above here +Controllers -+Support --+Actions 'Any custom action classes --+Controllers 'Base controller classes +Models -+Domain 'Contains any class that specialise view specific domain logic --+UrlProcessing 'Encoding/decoding business entities as URL parts --+... 'More things like the above here -+Views 'Contains view models --+Support ---+Views 'Base classes for any view models +Support -+Application 'Global application interface classes (i.e. class that wraps the function of the global asax) -+Configuration 'Typed config classes -+Helpers 'Where you put additional html helper classes,etc -+Services --+Bootstrap 'Tasks that run on mvc start-up that are specific to the MVC project --+Inversion 'Specific IoC registration registrations for this project --+... 'More things like the above here +Views -+Home -+Shared -+... 'More things like the above here 干杯安东尼 解决方法
我有类似的结构,有一些例外:
还有一些例外,与模型有关:
到目前为止,它工作得很好 注意,对于更复杂的网站,构造ViewData(我甚至以相同的方式构造我的javascript,View == JS文件,其中包含名为[ViewName]的对象下的所有内容)可能不被接受. 哦…和=> folder ==我的命名空间.我想这是一个很好的做法. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc – 为什么必须将LESS文件设置为Build Action“
- 如何将对本地创建的NON ASP.Net 5 dll的引用添加到ASP.Net
- ASP.NET:使用混合的HTML格式本地化内容
- asp.net – 我可以使用msbuild打包带有发布配置文件的网站并
- asp.net – 在开发,分段和生产环境之间区分web.config
- asp.net-mvc – 使用MVC Web应用程序时Nhibernate的最佳缓存
- 什么可能导致asp.net应用程序忘记用户?
- ASP.NET LinqDataSource数据绑定后,遇到[MissingMethodExc
- asp.net – 通过文本查找DropDownList索引
- 白话ASP.NET MVC之二:Controller激活系统的概览
推荐文章
站长推荐
热点阅读