concept SharePoint Service Locator in category sharePoint

appears as: The SharePoint Service Locator, SharePoint Service Locator
SharePoint 2010 Web Parts in Action

This is an excerpt from Manning's book SharePoint 2010 Web Parts in Action.

The Microsoft Patterns & Practices group has created a base service locator implementation and a specific service locator for SharePoint. The SharePoint Service Locator allows developers to store different type-mappings at different levels in SharePoint, such as farms or site collections. That way, your service can use different Models or Views depending on where it’s located or depending on what features have been enabled at the current level.

13.3.2. Use the SharePoint Service Locator

The SharePoint Service Locator provides functionality to register a service using an interface and an optional key value and functionality to locate an implementation of a registered interface. In this section, you’ll learn how to modify the Web Part you built using the MVP pattern to use the locator to find the implementation of the Model.