SharePoint 2007 - Always Use Solutions for Customizations

Saturday, 3 May 2008 00:52 by RanjanBanerji

One of the biggest problems I face in dealing with SharePoint 2007 is dealing with SharePoint developers with prior version experience.  Luckily or unluckily I had never used SharePoint before 2007.  So everything I know (very little) is based on the past 6 odd months of experience with SharePoint 2007.  One thing I have noticed across various SharePoint 2007 projects is that nobody, absolutely nobody uses solutions to deploy custom code.  When I raise this issue I get responses like:

  • Its just a simple web.config edit I don't need a solution for this.
  • I am not deploying a webpart
  • Its just one DLL, and so on.....

A while ago I was assigned to rescue a SharePoint project that was a disaster.  It was the first time I was dealing with SharePoint.  The application was made up of two farms each with about 10 servers.  As I learnt about the application I realized that there were about 20 DLLs, and various scripts, aspx pages, css files, images, etc that were deployed to the GAC, 12 hive etc.  It took an average of 10 days to build these two farms from scratch mostly because many errors were being made. 

Imagine copying, adding to the GAC, adding to the SafeControls list in the Web.config, copying files to the 12 hive etc across 10 servers.  Imagine having to do this each time you add a new server to the farm.  This is insane.  Strangely Microsoft recognized this insanity from pervious versions of SharePoint and corrected it by providing the ability to create and deploy what they call SharePoint solutions.

A SharePoint Solution is a way to package and deploy almost any kind of customization to a SharePoint application.  The beauty of doing so is that the solution is added to the farm/application and not to a server.  The CA (Central Admin) via the Timer service then deploys the solution to each server in the farm.  Why is this good?  Because:

  • A single deployment will deploy and make changes to all servers in a farm
  • Easier configuration management and source control.
  • When you add a new server to a farm all solutions will automatically get deployed to the new server.  You will not have to copy any of your code to the new server.
  • Updating and removing custom code is now a one step process.


To give you an idea, a farm that took days to build is now built in 1 hour.  A few solutions or a single solution with all custom code in it needs to be executed and all servers will have all the relevant files.  When you remove a server from a farm all your custom code will be cleaned off that server thereby making it available for use on another farm if needed. 

So next time you need to deploy some customizations please create a solution.  Take off your "I have been doing SharePoint work for 10 years and I know all" hat and learn something new. :-)

Categories:   SharePoint
Actions:   E-mail | Permalink | Comments (2) | Comment RSSRSS comment feed