简体   繁体   English

如何管理在不同客户系统上运行的源代码?

[英]How to manage the source code that runs on different customer's systems?

We have an application which is implemented for our own company. 我们有一个为我们自己的公司实施的应用程序。 By time, the application has been purchased by various companies. 到时候,该应用程序已被各个公司购买。

For each company, we created a new TFS Branch in source control. 对于每家公司,我们在源代码管理中创建了一个新的TFS分支。 And each one has been changed for specific customer requirements. 并且每个都已针对特定客户要求进行了更改。

That's why the source code has many versions now. 这就是源代码现在有很多版本的原因。 Making a change became so difficult because the change needs to implemented and tested seperately for each branch if it is from a common structure. 进行更改变得如此困难,因为如果来自共同结构,则需要针对每个分支单独实施和测试更改。

What is the best and conventional way to manage source code? 管理源代码的最佳和最常用的方法是什么?

Is it recommended to have a SINGLE SOLUTION that can run on each customer's systems. 是否建议使用可在每个客户系统上运行的单一解决方案。

There are several ways to handle customer-specific customizations, among them: 有几种方法可以处理客户特定的自定义,其中包括:

  • Keep a completely separate branch per customer and eventually merge code between branches. 为每个客户保留一个完全独立的分支,最终在分支之间合并代码 This is the solution you deploy right now. 这是您现在部署的解决方案。
  • Architect the application in a way where you have a customer-independent "kernel" which has pluggable custumization hooks. 以一种具有客户独立“内核”的方式构建应用程序,该内核具有可插入的保留挂钩。 Only the customizations would be kept in separate independent repositories. 只有自定义项才会保存在单独的独立存储库中。
  • Put the customizations into a common application and make them configurable ("on/off"). 将自定义项放入一个通用应用程序并使其可配置(“开/关”)。

Which route to take depends on the nature of the application and the amount of customizations per customer. 采用哪种方法取决于应用程序的性质和每个客户的自定义量。 If the context allows so, separate branches are least favourable due to the manual merging, bug fixing and testing overhead. 如果上下文允许,由于手动合并,错误修复和测试开销,单独的分支是最不利的。

In a specific industry (telecom billing systems) I have seen all three: suppliers who work with dedicated code branches, others with pluggable customizations and configurable off-the-shelf products. 在特定的行业(电信计费系统)中,我看到了三个:使用专用代码分支的供应商,其他具有可插拔定制的供应商和可配置的现成产品。 Naturally, each supplier has a different level of customization flexibility, level of productification and integration approach. 当然,每个供应商都有不同级别的定制灵活性,生产水平和集成方法。

As a software supplier the big trade-off is to balance the level of customization flexibility versus the level of productification. 作为软件供应商,最大的权衡是平衡定制灵活性水平与生产水平。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM