对于一个开源asp.net MVC项目的项目结构的建议 [英] Project structure recommendation for an opensource asp.net mvc project

查看:149
本文介绍了对于一个开源asp.net MVC项目的项目结构的建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您如何看待项目结构,为建立在asp.net MVC应用程序的开源CMS应用程序?该项目的绰号是高尔。

What do you think of the project structure for an opensource CMS application built on asp.net mvc application? The project nickname is "Gol".

的基本要求在以下职位概述。

The basic requirements are outlined in the following posts.

的开源CMS在ASP.NET MVC 思路

目前我正在考虑铺设下来是这样的...

Currently I am thinking of laying it down like this...


  • Gol.Core.Session(包含会话管理器无论真假)

  • Gol.Core.Caching(包含缓存包括速度,企业库。供应商)

  • Gol.Core.Logging(包含日志记录组件和供应商)

  • Gol.Core.Instrumentation(含仪器有关的项目)

  • Gol.Core.UI(UI佣工,以及与UI其他东西)

  • Gol.Core.Security(安全认证相关的东西)

  • Gol.Core.Utilities(常见实用功能,如加密,辅助方法,等等)。

  • Gol.Core.Metadata(元数据管理器)。

  • Gol.Web.Controllers(所有控制器放在这里)。

  • Gol.Core.Session (contains session manager both real and fake)
  • Gol.Core.Caching (contains caching including velocity, enterprise lib. provider)
  • Gol.Core.Logging (contains logging components and providers)
  • Gol.Core.Instrumentation (contains instrumentation related items)
  • Gol.Core.UI (UI helpers, and other things related to UI)
  • Gol.Core.Security (security,authentication related things)
  • Gol.Core.Utilities (common utility functions like encryption, helper methods, etc).
  • Gol.Core.Metadata (metadata manager).
  • Gol.Web.Controllers (all controllers goes here).

Gol.Cms.Contracts(包含服务合同)

Gol.Cms.Contracts (contains the service contracts)

Gol.Cms.Services(包含服务实现)。

Gol.Cms.Services (contains the service implementation).

Gol.Web(包含意见的web项目)

Gol.Web (the web project that contains the views)

你觉得呢?是结构过载/臃肿?

What do you think? Is the structure overloaded/bloated?

您的想法/建议表示欢迎根据你的经验(自认倒霉asp.net mvc的专门做)。

Your thoughts/suggestions welcome based on your experience (nothing specifically do with asp.net mvc).

这可以帮助别人,以及谁可能有兴趣在设计初始项目结构。

This may help others as well who may be interested in designing the initial project structure.

推荐答案

我通常会组织我的MVC项目的以下项目:

I usually structure my MVC projects with the following projects:

 web
    web.Controller
    model
    Business Logic
    Data Access
    Services
    Any Libraries for sessions, caching etc.

您有相当一个结构良好的项目虽然有几件事情我觉得你可以做,以改善它。

You have quite a well structured project although there are a few things I think you can do to improve it.

创建,你必须让你可以隔离测试每个层的测试项目。如果您改变presentation层,你可以转储与之相关的任何测试,并轻松地将您的经营业务逻辑。我还要创建集成测试,因为我有每一层的另一个项目。这是为了让您可以排除他们更快的持续集成编译。

Create a test project for each layer that you have so that you can isolate the tests. If you change your presentation layer you can dump any tests associated with them and move your bussiness logic easily. I would also create another project for integration tests for each layer I have. This is so that you can exclude them for quicker continuous integration compiles.

我也不会在Goi.Core.UI.的UI code你的UI code是大概是presentation malipulation,应该住在Goi.web

I would also not have the UI code in Goi.Core.UI. Your UI code is probably for presentation malipulation and should live in Goi.web

祝你好运与您的项目

这篇关于对于一个开源asp.net MVC项目的项目结构的建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆