Chapter 4. WSS v3 Platform Services

By Dan Attis

Windows SharePoint Services version 3.0 (WSS v3) offers developers an immense set of features that can be leveraged to customize and extend its out-of-the-box functionality. This chapter explores how you can use these features to create customized solutions to solve complex problems while adding tremendous business value to some of the out-of-the-box functionality discussed in other chapters.

Throughout the course of this chapter, you will become familiar with the following concepts:

  • Site Definitions

  • Custom field types

  • Features

  • Solutions

  • Web Parts

To help explain why all of these seemingly disparate topics are discussed in the same chapter, imagine the following scenario. Suppose that you created a Custom Field Type to be used on a list of your choosing, had a custom Web Part that talked to an external system, and needed a custom Site Definition to ease the creation of your custom sites by placing the appropriate Web Parts on the home page among other things. All three of these could be packaged into a Feature and deployed via a Solution. This is by no means an exhaustive list of the possibilities and is only meant to demonstrate how these five topics may end up being related in your custom solution. Each of them could be created and deployed independently as well, if that was desired.

All of the examples and demonstrations in this chapter utilize what can be referred to as a manual approach to development and deployment. With respect to development, a set of templates known as the Visual Studio Extensions for Windows SharePoint Services v3 are currently in development. Rather than include code and templates that are subject to change, this chapter steps through the fundamentals manually without using the templates, and I refer you to Appendix A on the Visual Studio Extenions for an overview of the templates in their current state. With respect to deployment, all of the examples aside from the Feature example created in this chapter, are deployed in the old-school way (file copy and/or command line). The "right" way to deploy the examples in this chapter is through the Solution Framework. Because that is introduced and discussed later in this chapter, we will only use it for the example immediately preceding it, in this case, the Feature example.

Many aspects of the WSS development process involve the creation and maintenance of XML files. Editing an XML file without an intimate knowledge of the underlying schema file (XSD) is quite difficult. Doing so in an environment that supports IntelliSense and not having IntelliSense available to you while editing your XML files can be very disappointing. WSS v3 does in fact ship with an XSD file that you can attach to your environment. The following steps outline this process and we highly recommend that you walk through it before beginning any of the hands-on examples in this chapter.

  1. Open Windows Explorer and navigate to [Visual Studio 2005 Installation Directory]XmlSchemas.

  2. Create a new XML file, and insert the following snippet into it:

    <SchemaCatalog xmlns="http://schemas.microsoft.com/xsd/catalog">
      <Schema
        href="file://C:/Program Files/Common Files/Microsoft Shared/web server
    extensions/12/TEMPLATE/XML/wss.xsd"
        targetNamespace="http://schemas.microsoft.com/sharepoint/"/>
    </SchemaCatalog>

  3. Save the file and give it a meaningful name, such as wsscatalog.xml.

  4. Open Visual Studio 2005 and create a new XML file.

  5. Create a WSS v3 XML file root node such as <Feature>, add the xmlns attribute and choose the SharePoint namespace from the list provided to you by IntelliSense.

From this point forward, you will have IntelliSense available to you as you edit this file for all elements and attributes. This will certainly make your life much easier as you begin to create, edit, and maintain all of the different types of XML files you will encounter during your WSS v3 development experiences.

In addition, all references to the SDK are referring to the Windows SharePoint Services 3.0 SDK located at the following URL (http://msdn2.microsoft.com/en-us/sharepoint/default.aspx).

It's now time to dive into some WSS v3 development and begin by creating a custom Site Definition.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.60.117