0

对我们大多数人来说,这可能是一个非常愚蠢的问题,但我完全不知道 .NET 项目层次结构应该如何......

我有 Java 背景,通常项目层次结构是

+project-db-layer
+project-common
+project-db-api
+project-business-layer
+project-ui

通常,我为 Java 解决方案创建 5 个项目(这是最多的,我主要使用 3 个项目,如模型-视图-控制器层次结构)。

我想知道,如果有人可以在这里提出一些指导方针,或者指点我进行一些在线测试(我找不到一个像样的),那么项目结构应该如何在 .NET 中用于桌面应用程序。

PS:这个项目的背景很少。我计划制作一个基于 .NET v 2 的 .NET 应用程序(因为我的目标受众仍然拥有具有标准 RAM 的 WindowsXP)。桌面应用程序将是面向数据库的,保留客户记录、发票、仓库、库存、购买/销售等。

这让我想起了另一个问题,基于我的项目,.NET 是更好的选择吗?

4

1 回答 1

1

The project layout you have described sounds appropriate for the type of application you describe. The only reccomendation I would make is that you use the .Net convention of the Project name being used for the Namespace. You would, therefore, end up with the slightly changed list of projects:

  • Company.ProjectName.DbLayer
  • Company.ProjectName.Common
  • Company.ProjectName.DbApi
  • Company.ProjectName.BusinessLayer
  • Company.ProjectName.Ui

This is, of course, very loose guidance, and it does not apply universally, but it is the reccomendation I give to my developers.

Re: @stakx, I do agree, you may not wish to rule out newer versions of .Net. You may see performance improvements on newer versions. With those requirements, you may wish to avoid WPF, as it imposes a slightly higher set of requirements, but the requirements for .net2 are near identical for .net4 for a winforms application. The real consideration is whether the target framework will already be installed.

于 2012-10-07T01:17:08.970 回答