This second post on my SharePoint Deployment Series is focused on the concepts of Feature and Solution. Check the first post SharePoint 2007 Deployment: Overview for an introduction and the series index.
What's a Feature?
A Feature is a package composed of a set of XML files that describe Windows SharePoint Services elements, which can be activated on a specific scope to help users accomplish a given task. To make it easier to understand, I usually say that you should use a Feature when you need to add one or more objects to SharePoint and want to allow users to easily enable or disable that option.
With a feature you can:
- Add a site column
- Add a site content type
- Add a list template
- Create a list instance
- Add custom actions to SharePoint's menus
- Install web parts, master pages, layout pages, images and other contents
- Register event handlers
- Associate a content type with an existing list
- Install a custom workflow
- Install a custom control
- Install a custom document converter
However, a feature cannot install itself. For that, it needs a solution.
What's a Solution?
A Solution is a deployable and reusable package that can contain a set of Features, site definitions and assemblies that you can apply to a site, and can also enable or disable individually. A Solution is materialized in a solution file, which is a file with a CAB-based format with a
With a solution you can:
- Install Features
- Install assemblies in the GAC
- Install assemblies to the BIN folder of a web application
- Add assembly descriptions to the web.config safe controls section
- Set Code Access Security configurations
- Install files in the template folder of SharePoint (usually
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE)
- Install files in the root folder of SharePoint (usually
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12)
- Install a site definition
A Solution is the only way to automatically execute a deployment of functionality to a SharePoint server farm.