- To implement the solution as described in Solution Overview, the solution package needs to perform various deployment tasks. The following diagram shows these deployment tasks together with the order in which they must be performed.
The dependencies between these tasks are fairly intuitive:
- The site columns include a lookup field that retrieves metadata from the Projects list, so you must deploy the Projects list before you can deploy the site columns.
- The SOW and Estimation content types include site columns and document templates, so you must deploy the site columns and the document templates before you can create the content types.
- To associate the content types with the Estimates libraries, you must first create both the content types and the libraries.
|The deployment of the Web Part does not directly depend on the deployment of any other components. Although the Web Part will not do anything useful until these components are in place, there is nothing to prevent you from deploying it up front.|
In order to manage these tasks and dependencies, the ExecutionModels.Sandboxed solution consists of three features, as shown in the following diagram. The arrows represent feature activation dependencies. For more information about feature activation dependencies, see Activation Dependencies and Scope on MSDN.
|When you use Visual Studio 2010 SharePoint tools to package a solution, be aware that features are installed in the order in which they appear in the Package Designer. If your features include activation dependencies, make sure that you order your features correctly. In this solution, the ProjectsList feature appears at the top of the list, followed by the EstimateCTs feature, followed by the EstimatesInstance feature. For more information about feature ordering, see How to: Change Deployment Order.|
These three features perform the following actions:
- ProjectsList. This feature creates an instance of the Projects list on the root site of the site collection. It also adds the AggregateView Web Part to the Web Part gallery on the site collection.
- EstimateCTs. This feature deploys the document templates and the new site columns to the site collection. When the feature is activated, the event receiver class uses the document templates and the site columns to create the SOW and Estimation content types. Programmatic creation of content types is new in SharePoint 2010.
- EstimatesInstance. This feature creates an instance of the Estimates document library on each subsite. When the feature is activated, the event receiver class associates the SOW and Estimation content types with each Estimates library.
The next topics in this section describe these components in more detail.