463
16
Featur es
In the previous chapter we discussed how to customize SharePoint using cus-
tom site definitions. Customizing SharePoint in this way is not new; Share-
Point Portal Server 2003 was built on the site definition and site template
infrastructure and included common XML files such as ONET.XML and
WebTemp.XML. However, comparing the content from the ONET.XML of
a SharePoint Portal Server 2003 site definition with the ONET.XML of a
SharePoint Server 2007 site definition shows a significant reduction in the
complexity and size of the ONET.XML. For example, one such difference is
the lack of content in the
ListTemplates element which, for SharePoint
2003, is responsible for defining the lists available to a site provisioned from
the site definition. The types of lists defined include an announcements list, a
document library, and a links list. Lists are still prevalent in SharePoint Server
2007 sites, so how do they get defined? The answer comes in the form of Fea-
tures. A Feature is a new concept introduced with the SharePoint Server
2007 platform which allows you to easily add and remove functionality and
customizations to and from your SharePoint sites. This chapter describes the
Feature architecture and steps you through the Feature lifecycle.
16.1 What is a Feature?
When it comes to customizing and extending the capabilities of a SharePoint
Portal Server 2003 deployment there is little in the way of efficiency or flexi-
bility. Outside of the Web Part world, adding new functionality, such as a
new type of list or navigation bar, to a SharePoint Portal Server 2003 deploy-
ment often results in creating a new custom site definition or modifying an
out-of-the-box site definition, thereby placing your deployment in unsup-
ported territory. It is cumbersome and inefficient to have to create an entire
custom site definition to implement additional functionality. Thankfully,
SharePoint Server 2007 introduces the concept of Features. A Feature is a
package of components that implements a specific piece of functionality to
your SharePoint deployment, such as a custom list, a set of Web Parts or a
Get Microsoft SharePoint 2007 Technologies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.