454 15.3 Site Definition Solution Files
easy method to add list view Web Parts to a page; in fact, this is exactly how
the announcements and calendar list view Web Parts are instantiated in Fig-
ure 15.15. Figure 15.16 shows the corresponding
View element definitions.
The
View element has a large amount of associated attributes, all of which
are well documented in the WSS 3.0 SDK. These attributes allow you to
specify such things as how many row items to return in the View, and
whether to display only the files of a specific folder.
The
SiteFeatures element identifies the site collection Features to
activate in site collections created using the associated configuration. The
WebFeatures element identifies the Web Features to activate in sites created
using the associated configuration. Both elements contain a Feature child ele-
ment that is used to individually specify each Feature that needs activation.
All that is needed to activate a given Feature is the Feature ID. It is important
to note that SharePoint activates Features listed in ONET.XML in the order
in which they appear; if you have any Features that are depended upon by
other Features then these need to be listed first.
15.3 Site Definition Solution Files
In Chapter 10, Planning the SharePoint Deployment we introduced the new
solution deployment concept introduced with SharePoint Server 2007 and
Windows SharePoint Services 3.0, which basically allows you to package all
the components that comprise your specific customization into a single solu-
tion file. The solution file is a CAB file with a WSP extension, and it provides
a convenient way to deploy site definitions across an entire SharePoint farm.
This means that you no longer need visit each Web front-end server to copy
your site definition files, and if you need to remove the site definitions from
the farm, you can easily retract the definitions using the central administra-
tion browser interface. There are many files associated with a given site defi-
nition, especially when you start tracing the features stapled to the site, and
we have seen that manually creating a site definition leaves a lot of room for
errors. The good news is that Microsoft has provided a number of Visual Stu-
dio tools to automate this process as much as possible. The tools are collec-
tively known as the Visual Studio 2005 extensions for Windows SharePoint
Figure 15.16
View element
definition.

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.