Reference Implementation: Farm Solutions

Although you can use sandboxed solutions and hybrid approaches to deploy a wide variety of SharePoint applications, there are some components, such as timer jobs, that must be deployed as full-trust farm solutions. This reference implementation illustrates the use of a timer job to aggregate data across multiple site collections.

The Sandbox Reference Implementation includes a sandboxed solution that retrieves statement of work (SOW) documents and estimations from multiple lists in a site collection. The solution includes a Web Part that displays a summary of the aggregated content on the site collection root site. The Full-Trust Proxy Reference Implementation extends the list aggregation scenario to supplement the aggregated data with accounts payable details from a vendor system. The solution uses a full-trust proxy that connects to an ERP Web service and retrieves information about the current vendor. This reference implementation further extends these scenarios by using a timer job to aggregate content from multiple site collections.

The reference implementation highlights details and best practices in the following areas:

  • Creating, deploying, and registering a timer job
  • Managing configuration data for timer jobs
  • Deploying custom application pages to the Central Administration Web site
Ff798362.note(en-us,PandP.10).gifNote:
This solution builds on the Sandbox Reference Implementation and the Full-Trust Proxy Reference Implementation. To fully understand the concepts in this solution, we recommend you first familiarize yourself with the documentation for these implementations before you study the Full-Trust Reference Implementation (Full-Trust RI).

Solution Scenario

In this example, suppose you are a SharePoint consultant working for a pharmaceutical company named Contoso Inc. The Northwest division of Contoso currently includes manufacturing plants at Blue Bell and New Brunswick. The construction and maintenance teams in each plant all have their own sites on the corporate intranet portal, which they use to track statements of work (SOWs) and corresponding budget estimates in the team.

The general manager of the Northwest division, Phyllis Harris, now wants you to extend this solution. Phyllis wants to be able to view a rollup of all open estimates to gain an understanding of the potential uncommitted work in the division. To meet Phyllis 's requirements, you implement a timer job that retrieves approved estimates from each site collection in the division. The timer job then populates an Approved Estimates library on the divisional site collection, as shown in the following illustration.

The Approved Estimates library

Ff798362.7690a8c4-9b52-442c-9288-ccaac8061d25(en-us,PandP.10).png

Deploying the Farm Solution RI

The Farm Solution RI includes an automated installation script that creates a site collection, deploys the reference implementation components, and adds sample data. After running the installation script, browse to the new Headquarters site collection at http://<Hostname>/sites/HeadQuarters. You can open and run the solution in Visual Studio, but this does not create a site collection or add sample data. To see the system fully functioning, you must run the installation script. The following table summarizes how to get started with the Farm Solution RI.

Question

Answer

Where can I find the Farm Solution RI?

<install location>\Source\ExecutionModel\FullTrust

What is the name of the solution file?

ExecutionModels.FarmSolution.sln

What are the system requirements?

SharePoint Foundation 2010

What preconditions are required for installation?

  • You must be a member of SharePoint Farm Admin.
  • You must be a member of the Windows admin group.
  • SharePoint must be installed at http://<Hostname:80>. If you want to install to a different location, you can edit these settings in the Settings.xml file located in the Setup directory for the solution.
  • SharePoint 2010 Administration service must be running. By default, this service is set to a manual start. To start the service, click Start on the taskbar, point to Administrative Tools, click Services, double-click SharePoint 2010 Administration service, and then click Start.
  • The timer service must be running. To start the timer service, click Start on the taskbar, point to Administrative Tools, click Services, double-click on SharePoint 2010 timer, and then click Start.

How do I Install the Farm Solution RI?

Follow the instructions in the readme file located in the project folder.

What is the default installation location?

http://<Hostname>/sites/HeadQuarters

(This location can be altered by changing the Settings.xml file in the Setup directory.)

How do I download the Sandbox Farm Solution RI?

The Sandbox Farm Solution RI is included in the download Developing Applications for SharePoint 2010.


Show: