views:

293

answers:

1

We have a blog system that we sold to a number of different customers (included in many different projects). This system includes a number of different files – a few aspx pages, one or two ascx controls, one css file, one javascript file and some codebehind/vb.net utility files. In general 90+% of this module is the same between customers – but of course every customer wants some customization – from cosmetic html/css changes to server/client logic tweaks.

Currently, to deploy our blog system to a new project we simply copy the files (from the last project we worked on) and customize the files as needed…but now we have 10 unique and incompatible copies of our blog system. Just getting the blog system working in each project takes a fair amount of time – and spreading the improvements from newer blog systems to older systems and maintenance is a real headache.

Ideally we would have a single “golden copy” of our blog system files that served the general (90%) case. We could add that golden copy to a new project and have a blog system working almost instantly – however we could then add or customize files as necessary. Even better – as we make improvements to the “golden copy” those changes can be easily deployed to all our sites – while honoring the customizations we have made for our customers.

I know we could add new css files to change base classes and add new vb.net classes that override base server side logic – but I’m really not sure how to handle aspx, ascx and js files. Ideally we could find a file based or source safe solution – for example if a new file is present with customizations it would automatically override any corresponding markup/js/etc in the golden file. Of course we are open to all solutions - this seems like a pretty common scenario so I was hoping someone would have developed a “best practice.” Is what I’m describing even possible? Any advice or direction is really appreciated – thanks in advance!

Shane

A: 

You could use your source control system and Visual Studio to do this, but it could get messy if your successful (many clients). If you took this approach, here’s how I would do it.

  1. Separate the code into 2 structures or Visual Studio projects. The common code (the 90% you mention) and the customized code (the other 10%).

  2. Create an initial structure or baseline in your source control system. This is the most generic version of the two code sets.

  3. Branch the customized portion of the code for each client.

  4. Branch the common code portion when you have bug fixes or other updates. Within Visual Studio you could either create 1 project and merge the directories or use 2 different projects combined under one solution.

Hope that helps.

Curt