什么建议的解决方案结构在asp.net有点大网站 [英] Whats a recommended solution structure for a somewhat large website in asp.net
问题描述
林目前正在重构,这并不具有任何分离在所有项目(asp.net MVC)。只是文件夹:■
Im currently trying to refactor a project(asp.net mvc) that doesnt have any separation at all. just folders :s
- 项目有一堆EF code第一类(People.cs,Exam.cs,
Message.cs等) - 的项目有几个仓库(它们都使用EF数据
上下文) - 当然,很多控制器和的ViewModels的
我们有一个测试项目,但我们的arent在TDD很好,所以它不是我们真的努力到现在为止。
We have a Tests Project but we arent very good at TDD so its not something we are really working on as of now.
我想对不同的职责更清晰的分离,该项目必须解决并且将AP preciate一个良好的项目结构一些意见认为实现这一目的。
I would like to have a clearer separation on the different responsibilities that the project has to address and would appreciate some advice on a good project structure that achieves this.
请帮忙。
在此先感谢
Please help. thanks in advance
推荐答案
我建议以下领域驱动设计(DDD)和一个建议奠定了这一点,将创建下列项目的方式:
I would suggest following a Domain Driven Design (DDD) and one suggested way of laying this out would be creating the following projects:
Company.Project.Web
< - 你的MVC应用程序,但你仍然可以使用的WebForms Company.Project.Domain
< - 数据传输对象(DTO的)的ViewModels,业务逻辑,事件 Company.Project.Data code>< - 库接口
Company.Project.Web
<-- Your MVC Application, though you can still use WebForms
Company.Project.Domain
<-- Data Transfer Objects (DTO's), ViewModels, Business Logic, Events
Company.Project.Data
<-- Repository Interfaces
Company.Project.Data.EF
&LT; - 的EntityFramework库的具体实施 Company.Project.Model
&LT; - 您的EF codeFirst类
Company.Project.Data.EF
<-- EntityFramework Specific Implementation of Repositories
Company.Project.Model
<-- Your EF CodeFirst Classes
Company.Common
&LT; - 公用事业和/或扩展一个共同的项目
Company.Common
<-- A common project of utilities and/or extensions
我建议你看一看项目丝绸 HTTP://silk.$c$cplex.com/ 从模式和实践团队。 DDD,存储库和MVC的大参考实现,以及在HTML 5和jQuery(vNext)混合
I would suggest you take a look at Project Silk http://silk.codeplex.com/ from the patterns and practices team. Great reference implementation of DDD, Repository, and MVC as well as mixing in HTML 5 and jQuery (vNext).
这篇关于什么建议的解决方案结构在asp.net有点大网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!