【发布时间】:2012-06-12 16:54:12
【问题描述】:
我们的团队正在考虑使用 Team Foundation Server v.11 (2012) 来管理我们的项目。我们目前在电子表格中进行项目管理。我们的团队只为内部客户开发软件,项目之间有很多 dll 共享。我们还使用 SVN 进行源代码版本控制。
我们为应用程序的不同部分提供解决方案:公共库、应用程序库(业务规则等)、Intranet 网站、Internet 网站、Windows 窗体。这是我们的 SVN 结构的样子
SVN
-CommonLibrary (VS Solution)
-Source
-CommonLibrary.Core (VS Project)
-CommonLibrary.Security (VS Project)
-CommonLibrary.Web (VS Project)
-OurCompanyLibrary (VS Solution)
-Libraries (Projects within this solution reference these)
-CommonLibrary.Core.dll
-CommonLibrary.Security.dll
-Source
-OurCompanyLibrary.Application1 (VS Project)
-...
-OurCompanyLibrary.ApplicationN (VS Project)
-OurCompanyIntranet (VS Solution) (MVC framework)
-Libraries (Projects within this solution reference these)
-CommonLibrary.Core.dll
-CommonLibrary.Security.dll
-CommonLibrary.Web.dll
-OurCompanyLibrary.Application1.dll
-Source
-OurCompanyIntranet.Application1 (VS Class Library Project)
-...
-OurCompanyIntranet.ApplicationN (VS Class Library Project)
OurCompanyIntranet.UI (VS Web Project)
-OurCompanyInternet (VS Solution) (MVC framework)
-Libraries (Projects within this solution reference these)
-CommonLibrary.Core.dll
-CommonLibrary.Security.dll
-CommonLibrary.Web.dll
-OurCompanyLibrary.Application1.dll
-Source
-OurCompanyInternet.Application1 (VS Class Library Project)
-...
-OurCompanyInternet.ApplicationN (VS Class Library Project)
-OurCompanyInternet.UI (VS Web Project)
将代码拆分为多个解决方案的原因是因为我们可以在不同的情况下重用应用程序库(Intranet 应用程序、Internet 应用程序、Winform 应用程序)。此外,Intranet 和 Internet 解决方案包含多个应用程序。这是我们目前的结构。我不确定这是不是最好的组织结构,但它对我们有用。
切换到 TFS 的问题是一个团队项目不能在多个 VS 解决方案中包含部分。例如,我们将为 Application1 设置一个 TFS 团队项目,以便我们可以为该应用程序创建一个产品 backlog。 Application1 需要更改 OurCompanyLibrary、OurCompanyIntranet 和 OurCompanyInternet 才能完成应用程序,但使用 TFS,Application1 将只有一个 VS 解决方案。
以下是我们如何开发应用程序的示例。我们存储在 OurCompanyLibrary VS 解决方案中的所有领域模型和业务规则。当我们开发一个应用程序时,称之为Application1,我们首先开始在OurCompanyLibrary VS Solution下的OurCompanyLibrary.Application1 VS项目中创建领域模型和业务规则。一旦开发了域模型,我们就开始在 OurCompanyIntranet 和 OurCompanyInternet VS Solutions 中对事物的 UI 端进行编程。这些解决方案是一个 MVC 风格的网站。 OurCompanyIntranet 包含一个 VS Web 项目 OurCompanyIntranet.UI,其中包含所有视图(.aspx 文件)、css、javasciprt 等。OurCompanyIntranet 还包含由应用程序分隔的所有模型和控制器(在本例中为 OurCompanyIntranet.Application1)。在 TFS 中组织这成为一个问题,因为我们想要一个用于 Application1 的团队项目,但该应用程序可以跨越多个解决方案,并且我们不希望通过将相同的 OurCompanyIntranet 和 OurCompanyInternet VS 解决方案添加到源代码控制来到处都有重复的代码。
你会如何在 TFS 中组织这个?是否有另一种方式来组织我们的代码结构更有意义?任何能引导我们走向正确方向的文章或网站都会有很大帮助。
【问题讨论】:
标签: tfs