在获得一些反馈后,我已经为我的新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
安东尼加油
最佳答案
除了一些异常(exception),我的结构与您类似:
还有一些与Model相关的异常(exception):
到目前为止效果很好
请注意,对于更复杂的网站,按 View 构造ViewData(我甚至以相同的方式构造JavaScript,即View == JS文件,其中包含名为[ViewName]的对象下的所有内容)可能无法接受。
哦...对我来说=>文件夹==命名空间。我想这是个好习惯。