Share via


The SharePoint Guidance Library

The SharePoint Guidance Library contains reusable components that help you build robust SharePoint applications.

Note

The SharePoint Guidance Library is distributed as source code. To build and install the library, you should either run the automatic configuration script for the Partner Portal reference implementation or perform the following steps to install the library without installing the reference implementation.
Use gacutil.exe to place the Microsoft.Practices.ServiceLocation.dll assembly into your system's global assembly cache. The assembly is included as a binary with this guidance.
In Visual Studio, open the Microsoft.Practices.SPG2.sln solution file, and then build the solution. This creates several assemblies and a SharePoint solution package. It creates the following three assemblies: Microsoft.Practices.SPG.Common, Microsoft.Practices.AJAXSupport, and Microsoft.Practices.SubSiteCreation.

The following sections describe the components that are provided by the SharePoint Guidance Library:

  • SharePoint Service Locator. The SharePoint service locator decouples the consumers of an interface from the implementations of that interface. Instead of creating an object by invoking the constructor of a class, you request an object with a specified interface from the service locator. The SharePoint service locator uses SharePoint property bags to store the mappings of interfaces to corresponding implementation classes.
  • Configuration Manager. This is a hierarchical configuration manager that can safely store and retrieve configuration settings for a SharePoint farm, Web application, site collection, or site. The configuration manager uses SharePoint property bags as its backing store.
  • List-Based Repositories. A repository is a design pattern that separates a data source from its associated business logic by encapsulating the data access details. Repositories translate the underlying data representation into an entity model that fits the problem domain. The SharePoint Guidance Library includes classes that help you to implement repositories for SharePoint lists.
  • Workflow-Driven Site Creation. This component programmatically creates a subsite when a business event is added as a list item to a special SharePoint list. Adding an item to the list triggers a SharePoint sequential workflow. The workflow creates a collaboration Web site from a site template or site definition that is configured for that type of event.
  • Safe Script Manager. The SafeScriptManager class is an ASP.NET custom control that loads the .NET Framework's ScriptManager control if it is not already present on the current Web page. This control is useful for Web parts with child controls that require the script manager control because only one instance of the ScriptManager control can be added to a Web page. The SafeScriptManager control also helps you properly configure the AJAX UpdatePanel control for your SharePoint application.
  • SharePoint Logger. The SharePoint logger is a basic logging and tracing component that is tailored to the SharePoint environment. Logging is directed toward system administrators who typically rely on the Windows event logs to monitor deployed applications. Tracing is intended for developers.

Home page on MSDN | Community site