Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you deploy and manage a C# web application to a customer with some minor differences from your base project?

I have a semi-large web application that we run locally and I need to deploy it at another location. The second location will require some slight modifications to the project (especially cosmetic). How do you manage these differences and what do you use to distribute the site and updates to a customer like this?

Edit: Right now our web app runs in-house and we build with Cruise Control .NET and MSBuild with WDP. What would be a good option for deployment to the customer? We will not be updating their site for them so a solution that is simple for them to deploy and update is desirable.

like image 697
Greg Avatar asked Jan 19 '09 18:01

Greg


People also ask

What is deployment in C?

Deployment is the mechanism through which applications, modules, updates, and patches are delivered from developers to users. The methods used by developers to build, test and deploy new code will impact how fast a product can respond to changes in customer preferences or requirements and the quality of each change.

How do you deploy your project?

To deploy your Project, click the “Deploy” button in the lower right corner of the Project editor. On the Deployment screen, click the green “Deploy Project” button to deploy. After a moment, you'll see the URL to your deployed Project.

What is deployment procedure?

The deployment process flow consists of 5 steps: Planning, development, testing, deploying, and monitoring.

How do I deploy a program in Windows?

Start the deployment wizardIn the Configuration Manager console, go to the Software Library workspace, expand Application Management, and select either the Applications or Application Groups node. Select an application or application group from the list to deploy. In the ribbon, select Deploy.


2 Answers

Branch your code.

Hopefully your code is source controlled (if not, start now!), you should branch from the base to the "Customer X" branch and just make the slight cosmetic modifications in that branch. Then just build and deploy off of that branch for that customer.

Additionally, if the changes are minor enough, you could try to make the changes configurable. That way you could deploy the same site everywhere, and just change the configuration to match what the customer wants. The more complex the differences, the harder it will be to make them configurable though.

After reviewing comments: Its good to note that configuration is practical, but ONLY if the # of changes are minor, otherwise you will pollute your code with configuration logic. (Thanks commenters)

So: Lots of changes --> Branch (more maintainable), few minor changes --> Make configurable (more practical).

like image 186
TJB Avatar answered Sep 22 '22 16:09

TJB


We have to do it all the time. We try to generalize and make the differences between versions configurable. The most common reasons for customizations are:

  • additional database fields: we implemented a dynamic way to store these items in db
  • UI layout: we have special folders where we put images and css files which are loaded on demand
  • different mandatory input fields: we store the definition in the configuration and activate them programmatically
  • special reports: we put the template files in the custom folder in order to be chosen instead of the standard template

Some changes require programming new modules. We code them in a custom library which will be dynamically loaded inside the main application.

like image 37
splattne Avatar answered Sep 20 '22 16:09

splattne