Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you manage multiple versions of the same software for each customer?

Tags:

I have source code that is 95% the same for all customers. Some customers ask for something specific, however. How can I manage this, is it possible with VisualSVN/Subversion?

Update:

Some details about the application, it's a web ASP.NET MVC with NHibernate.

The application has several projects : the web part, the repo part (where we use NHibernate to access database) and a service project.

The service project uses the repo project and the service project is the project with business rules.

like image 587
Kris-I Avatar asked Jul 07 '10 12:07

Kris-I


People also ask

How do you maintain different custom versions of the same software for multiple clients?

For every customized version of the application maintain separate branches. Any good SCM tool will do really well with merging branches (Git comes to mind). Any updates in the master branch should be merged into the customized branches, but client specific code can stay in its own branch.


1 Answers

I can think of two approaches that might work.

The first involves branching the code for each customer. Any edit you make in the main line can then be integrated into the specific customer's branch when it's needed. Similarly if something in the core product is fixed in a branch it can be merged back into the main line for subsequent propagation to the other customers' branches. While this might seem the best approach it can be hard to maintain and keeping track of which branch has which edits will get fraught.

The second, and perhaps better approach, involves refactoring your code so that the customer specific code is in a single assembly - one per customer. This is then configured, perhaps by using dependency injection, when the product is installed. This way you only have one code line and no merging between branches. Though it does rely on the customer specific code being easily separated out.

like image 86
ChrisF Avatar answered Sep 17 '22 13:09

ChrisF