Export (0) Print
Expand All

Organizing Features

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

A SharePoint feature is a collection of SharePoint elements. It allows you to create server-side, file system-level customizations. In previous versions of SharePoint, developers modified the Onet.xml file to customize elements such as lists. In the current version of SharePoint, you can use features to make smaller and more modular changes that can be installed on new or existing sites. For example, you can use a single feature to add a set of lists and libraries combined with a workflow that, as a whole, enable a business process to function within SharePoint.

A feature contains one Feature.xml file. This file contains one or more feature elements. An element is an atomic unit within the feature. Examples of elements include content types, controls, and lists. A feature should contain all the elements that are required to provide some piece of functionality. Features are meant to be reusable and they should be as light and modular as possible. Features can have dependencies on other features, but these dependencies can make the activation and deactivation processes more complex.

A feature is activated for a single scope. The following are the four scopes:

  • Web. The scope of the feature is the Web site.
  • Site. The scope of the feature is the site collection.
  • WebApplication. The scope of the feature is the Web application.
  • Farm. The scope of the feature is the server farm.

A feature should contain only elements that are appropriate for its scope. For a list of the feature scopes and their appropriate elements, see SharePoint Feature on MSDN.

Organization of the Training Management Application

The Training Management SharePoint Solution is organized into two SharePoint features. The first feature contains all the site collection–level elements, such as content types and Web Parts. It is named ContosoTrainingManagementSiteCollection. The second feature contains all the site-level elements, such as list definitions, list instances, and custom ASPX forms. It is named ContosoTrainingManagementWeb.

The Registration Approval Workflow Solution

Special considerations were made in the packaging of the registration approval workflow. The registration approval workflow was intentionally packaged in a separate SharePoint solution. The registration approval workflow is essential for a fully functional training management application, but it should be treated differently due to its life cycle management. Registration approval workflow should be versioned and upgraded independently from the rest of the Training Management application. One benefit to this is that when the registration approval workflow is upgraded, any existing workflow instances can continue to run side by side with new versions of the registration approval workflows.

Web Solution Package

A Web solution package (WSP) is a deployable and reusable way to bundle components that extend SharePoint. A SharePoint solution is a file that has a CAB-based format but has a .wsp file name extension. It contains a list of SharePoint features, site definitions, assemblies, template files, and root files. The Windows SharePoint Services solution framework provides many benefits for deploying solutions. For more information about the benefits of the SharePoint solution framework, see Solutions Overview on MSDN.

Using Visual Studio extensions for Windows SharePoint Services and WSP View to Organize Features

Visual Studio extensions for Windows SharePoint Services uses the WSP View add-in to provide developers with a graphical interface for managing and organizing SharePoint features. The WSP View organizes the SharePoint artifacts in a Visual Studio solution (a .sln file) by SharePoint features, site definitions, and template files. By default, the WSP View creates a SharePoint feature for each item in the SharePoint solution. You can restructure the features by dragging elements from one feature to another. The WSP View also allows you to rename and delete features.

Figure 1 illustrates the reorganized structure of the Training Management features.

Ff647010.trainingmanagement_wspV2(en-us,PandP.10).png

Figure 1
Structure of Training Management solution

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Show:
© 2014 Microsoft