Chapter 7. Building a Project Management Main Site

In the previous chapter we went through the steps to design a reusable web template that can be used to provision a site to support a standard business process. The example we used was for project management, but it could have also been used for numerous other examples including product management, process improvement, inventory management, and so on. The value of creating those sites with standard templates and definitions is twofold; it cuts down on the amount of configuration needed when setting up each site, but it also provides a standardized set of content that can be aggregated and displayed on top-level sites.

This chapter takes us through the development of a Project Management Master site that can aggregate the key metrics and status information from the project management sites previously created. In addition, the site can also include process and community content similar to what was originally covered in Chapter 4, Building an Engaging Community Site.

This chapter covers the following topics:

  • Project listing and status Web Part
  • Rollup metrics
  • My Project Sites listing
  • Project Manager listing

By the end of this chapter we will be able to create a site capable of aggregating content and information from a number of project subsites.

Content aggregation options

As the content is organized across many site collections, it is important that the process used to get the information executes very quickly and efficiently. Depending on the type of content you are aggregating and how it will be used, the type of approach may change. In this case the content will also be somewhat dynamic with new project sites being provisioned on a regular basis. It would be impossible to maintain a manual list of all of the active projects.

There are three main approaches that can be considered: reading for the individual sites, using search, and compiling information via a scheduled job.

Reading individual sites or lists

The simplest way to read data from the Server OM is to make a call to SPList.GetItems for a given list. While this works great when you know exactly what you are looking for, and from which specific locations, it does not tend to be a great way to aggregate content, because it is too specific and does not scale as well as some of the other approaches.

It is also possible to query for all of the content within a site collection by making a call to SPWeb.GetSiteData. This is significantly more flexible than the previous method because it casts a wider net and looks throughout the site collection, but it would still require iterating through each site collection and would require that you know which site collections contain the content you are looking for.

Using these methods should not be the primary aggregation method, but can be combined with one of the following, to query additional content or details.

Search

The search index provides a great way to quickly and efficiently access content from a wide range of sources, especially when aggregating a list of similar or related content from a wide range of sites. It is possible to use KeywordQuery, FullTextSQLQuery, or in cases where FAST is available, FQL queries.

To increase the accuracy and speed of the queries, it is possible to fine-tune the query and configuration to target-specific search scopes, content types, and managed properties. Specifying the search scope will shrink the number of source records you are searching against, and specifying a content type or a managed property will allow you to filter the results down to a very precise level.

The first challenge to using the search index is that your content needs to be indexed regularly for accurate results in cases where your content changes frequently. In most cases incremental crawls are sufficient to pick up any new or modified content. If your content changes more frequently than it can be crawled, you may need to use an alternative approach.

The second challenge to using the search index is that very specific queries that filter or return content based on custom properties will need to have managed properties established, in order for the indexing process to recognize the specific fields and values. Setting up managed properties for a handful of specified fields is not a big deal, but mapping a dozen or more fields for a single solution might be cumbersome. An alternative to this approach would be to execute a simplified query to quickly get a list of content sources, and then iterate through that list and execute a call to the SPList.GetItems or SPWeb.GetSiteData method that was outlined earlier.

Scheduled job

In cases where you need to aggregate content for more complicated purposes, such as for a scorecard on a dashboard, it is not advisable to gather the data in real-time. In these cases it is advisable to run a timer job to generate the results. This will simplify the process by providing a single source for pulling the summary data or aggregated content.

Map custom properties as managed properties

As we saw in the Search section earlier, it is necessary to create managed properties for individual fields that we will return or filter by within our search query.

To create the mapping:

  1. Navigate to the Search Service Application.
  2. Click on the Metadata Properties link under the Queries and Results heading.
  3. Provide a Property name, Value, and a Description.
  4. Under the Mappings to crawled properties section, click on the Add Mapping button and search for the field identified in the content type.
  5. Select the appropriate mapping and click on the OK button.

This will need to be completed for the following properties:

  • Portfolio
  • ProjectDescription
  • ProjectManager
  • ProjectStatus
  • Sponsor
  • ScheduledStart
  • ActualStart
  • ScheduledCloseout
  • ActualCloseout
  • ProjectHealth
..................Content has been hidden....................

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