Tag Archives: Microsoft SharePoint 2010

SharePoint 2010: Master Pages in SharePoint 2010

An installation of SharePoint 2010 contains many master pages. There are master pages that preserve backward compatibility for sites migrated from WSS 3.0 or MOSS 2007 including the old master page for Team sites, default.master, and master pages for application pages including simple.master and application.master.

There are also new master pages that support the new look and feel of SharePoint 2010. These are the v4 master pages and generally speaking, there is a v4 master page that corresponds to the old master pages. For example, v4.master is the replacement for default.master and simplev4.master is the replacement for simple.master.

Master Page Locations

You can find SharePoint’s various master pages in a few different locations depending on the master page and the context of its use. Within a SharePoint site, master pages are in a document library called the Master Page Gallery. The URL for this library relative to the Web’s URL is _catalogs/masterpage.

When you create a site, SharePoint provisions the appropriate master pages from the SharePoint root to the Master Page Gallery. The stock master pages that deploy to the Master Page Gallery from the SharePoint root are in Template\Global. However, there are additional master pages that support various application and administration pages that never deploy to a site located in Template\Layouts and in Template\Admin.

Often you can find additional custom master pages in the SharePoint root as part of features that deploy master pages via a Module feature element or as part of a custom site template.

Associating Master Pages with Content Pages

You can associate a master page with a content page in several ways. Some of these are dynamic and resolve at runtime to the SPWeb’s MasterUrl or CustomMasterUrl property, while others are static.

To create a dynamic association, use one of the following tokens as the value of the MasterPageFile attribute in the Page directive.

  •  ~masterurl/default.master
  •  ~masterurl/custom.master

Figure below shows the ~masterurl/default.master token in action in SharePoint
Designer. In this case it resolves to /_catalogs/masterpage/v4.master, but you
could change the SPWeb.MasterUrl property; the master page would change
without modifying the content pages.

Masterpagesimg1

Alternatively, you can specify the exact master page you want your content page to use with one of the static tokens.

  •  ~site/ActualFileName.master
  •  ~sitecollection/ActualFileName.master

The page parsers interpret both sets of tokens at runtime, but it is also possible to control the selection of a master page dynamically with .NET code in a page’s OnPreInit method or by using an HttpModule.

doug (frame 367 of smile clip)This post is an excerpt from the online courseware for our Microsoft SharePoint 2010 for Developers course written by expert Doug Ware.

Doug Ware is a SharePoint expert and an instructor for many of our SharePoint 2007 and SharePoint 2010 courses. A Microsoft MVP several times over, Doug is the leader of the Atlanta .NET User Group, one of the largest user groups in the Southeast U.S., and is a frequent speaker at code camps and other events. In addition to teaching and writing about SharePoint, Doug stays active as a consultant and has helped numerous organizations implement and customize SharePoint.

Microsoft SharePoint: Custom Styles

Themes are sufficient for scenarios that require only the application of colors, but to exercise total control over styling you must create and use custom style sheets. There are a variety of ways to include custom style sheets in your SharePoint pages. Each has advantages and disadvantages.

The first is to include a standard HTML <link> element in a site’s master page, in a single page, or in a control. As this is basic HTML it requires no specific knowledge of SharePoint and it works in both farm and sandbox deployments. The disadvantage to this approach is that it is inflexible—the link URL will not change as you change the site’s location nor does it support any other SharePoint functionality like themes.

Another approach is to set the AlternateCssUrl property of the SPWeb class. This technique works in both farm and sandbox deployments. When the AlternateCssUrl property contains a value, a web control present in the v4.master page, CSSLink, renders an HTML <link> element containing the value of the AlternateCssUrl property after it renders the links for the core SharePoint style sheets.

Because CSSLink renders the AlternateCssUrl after the core styles you can be certain that the browser will apply your styles last. This is important because the order in which style sheets appear in a page determines which rules apply. Because the application of AlternateCssUrl appears after the core styles, you can use it to override and replace individual rules from the core styles.

You can specify any valid URL as the value of AlternateCssUrl. The only disadvantage to this approach is that it applies the target style sheet to every page in your site. Therefore, for styles that affect only a small portion of your site, like an individual control, you may choose a more targeted approach for performance reasons.

The CssRegistration web control provides the ability to add CSS to a page as needed for a given scenario. You can apply the control in both farm and sandbox solutions to any artifact that includes design time markup, i.e., pages and user controls. However, CssRegistration also includes a static method for use by Web Parts. Unfortunately, this is only available in farm deployments. CssRegistration allows the inclusion of CSS from specific locations including:

  • TEMPLATE\LAYOUTS\[LCID]\STYLES
  • Style Library
  • Absolute path

Unless you specify an absolute path, SharePoint automatically accommodates any changes to the site’s location providing flexibility that a <link> element lacks. CssRegistration also allows application of themes to style sheets whereas <link> does not.

It is important to know that the CssRegistration web control does not render anything at runtime. Instead it works in conjunction with the CSSLink control.

CssRegistration and CssLink

As the name implies, the CssRegistration control registers CSS for rendering by CssLink. If multiple items register the same CSS, for example two instances of the same Web Part, CssLink renders a single link. CssLink renders registered CSS in alphabetical order or based on the optional CssRegistration After property.

The After property is a new and welcome addition in SharePoint 2010. Also new is the ability to render links conditionally via the optional ConditionalExpression and RevealToNonIE properties. For example, to render a style sheet for only IE7 you can specify IE 7 as the value for ConditionalExpression.

The CssLink control renders more than just the values specified by CSSRegistration. CssLink renders links in the following order:

  • CssRegistrations
  • Core styles
  • AlternateCssUrl
  • DefaultUrl (Optional CssLink property value)

doug (frame 367 of smile clip)This post is an excerpt from the online courseware for our Microsoft SharePoint 2010 for Developers course written by expert Doug Ware.

Doug Ware is a SharePoint expert and an instructor for many of our SharePoint 2007 and SharePoint 2010 courses. A Microsoft MVP several times over, Doug is the leader of the Atlanta .NET User Group, one of the largest user groups in the Southeast U.S., and is a frequent speaker at code camps and other events. In addition to teaching and writing about SharePoint, Doug stays active as a consultant and has helped numerous organizations implement and customize SharePoint.

Lists and Libraries in the Object Model – Microsoft SharePoint 2010

The functionality that features provide to define and create lists is useful, but the static nature of XML means that you need more tools at your disposal to fully exploit the power of lists and libraries. Fortunately, just as you’d expect, the core SharePoint assembly contains a robust set of classes to allow automation of lists and their contents.

As you explore these classes, you may find yourself in familiar territory: The names may be new, but the techniques closely resemble those that you use to manipulate any .NET collection. The techniques for adding, editing, and deleting list items resemble those for every data access stack from Microsoft since Windows development first became popular in the 1990s.

In fact, the only unusual aspect of working with SharePoint lists and libraries is the query syntax which you will see in a later section.

You can accomplish a great deal in code with a relatively small number of
classes:

  • SPListCollection
  • SPList
  • SPDocumentLibrary
  • SPListItemCollection
  • SPListItem
  • SPListView
  • SPContentType
  • SPField

Each SPWeb instance exposes an SPListCollection via the Lists property that contains all of the SPList instances in the web. Some of the SPList instances are document libraries and are actually of type SPDocumentLibrary. Each SPList and SPDocumentLibrary exposes its items via the Items property, which is of type SPListItemCollection. Each item is an SPListItem.

The other classes, SPListView, SPContentType, and SPField represent a list’s presentation and structure.

Retrieving List Instances

If you need to access a list within a page context, perhaps as part of a custom list form, you can get the current List or ListId from SPContext.Current. In other situations, feature event receivers for instance, you access a list instance via the containing web.

Lists and libraries are members of a specific web. Therefore, instances of the SPWeb class expose a property named Lists that returns an instance of SPListCollection that you can use to enumerate all of the lists in the web.

The SPListCollection Item property has three overloads that you can use to retrieve a specific list instance. One takes the list’s GUID, one takes the list’s name, and the other takes the list’s ordinal position in the collection.

Alternatively, you can use the SPWeb.GetList method to retrieve a list based on its URL. This method is especially versatile because the URL can point directly to the list or to any of its forms using an absolute or site relative format.

doug (frame 367 of smile clip)This post is an excerpt from the online courseware for our Microsoft SharePoint 2010 for Developers course written by expert Doug Ware.

Doug Ware is a SharePoint expert and an instructor for many of our SharePoint 2007 and SharePoint 2010 courses. A Microsoft MVP several times over, Doug is the leader of the Atlanta .NET User Group, one of the largest user groups in the Southeast U.S., and is a frequent speaker at code camps and other events. In addition to teaching and writing about SharePoint, Doug stays active as a consultant and has helped numerous organizations implement and customize SharePoint.

Project Templates

The first thing you do when building a new solution in Visual Studio 2010 is to select a project template. The template you select determines the tools that are available and how Visual Studio behaves when you build the project. Visual Studio comes with project templates for a variety of Windows and Web application types. Among these are a number of templates for building SharePoint applications.

Several of the project templates concern development of specific types of features. Each of these is a starting point that allows you to add any type of feature, but that starts with an element manifest that corresponds with the project template’s name. The feature oriented project templates are:

  •  List Definition
  •  Content Type
  •  Module
  •  Event Receiver

Workflows are an important component of most SharePoint environments. There are five workflow specific project templates for SharePoint, two of these support workflow development for SharePoint 2007. The SharePoint workflow templates are:

  •  Sequential Workflow
  •  State Machine Workflow
  • Import Reusable Workflow
  •  SharePoint 2007 Sequential Workflow
  •  SharePoint 2007 State Machine Workflow

The SharePoint 2007 workflow templates are the only direct support Visual Studio offers developers writing code for SharePoint 2007. All of the other project templates support only SharePoint 2010.

The remaining SharePoint project templates are:

  • Empty SharePoint Project: An empty project with SharePoint tools.
  • Visual Web Part: A user control and a Web Part wrapper with a feature to add the Web Part to the deployment target.
  • Business Data Connectivity Model: A project with tools for building Business Connectivity Services applications.
  • Site Definition: A project pre-populated with files for a custom site definition.
  • Import SharePoint Solution Package: A project with imported contents from a WSP usually generated via the Save Site as Template functionality of a SharePoint site.

Most large solutions start with the Empty SharePoint Project template.

doug (frame 367 of smile clip)This post is an excerpt from the online courseware for our Microsoft SharePoint 2010 for Developers course written by expert Doug Ware.

Doug Ware is a SharePoint expert and an instructor for many of our SharePoint 2007 and SharePoint 2010 courses. A Microsoft MVP several times over, Doug is the leader of the Atlanta .NET User Group, one of the largest user groups in the Southeast U.S., and is a frequent speaker at code camps and other events. In addition to teaching and writing about SharePoint, Doug stays active as a consultant and has helped numerous organizations implement and customize SharePoint.

Types of Features

Most of the elements in a SharePoint installation are either defined using features or leverage features in some way. Accordingly, there are feature types that define most of the site elements with which you are already familiar.

Feature/Site Template Association

Feature/site template associations allow you to associate new features and functionality with existing site definitions or site templates so that, when you provision a site, SharePoint automatically activates the features. This technique is known as feature stapling.

Feature stapling makes versioning much easier because it allows you to associate new features with preexisting site definitions. Stapled features also provide an excellent way to handle situations that require activation code, because they are applied after their associated site is fully provisioned.

Two features are involved in feature stapling: the feature that contains the functionality you want to add to an existing site template, and the feature/site template association feature. Feature/site template associations have Farm or WebApplication scope.

You can globally associate a feature with every site definition on a farm. Associate a feature with the global site definition by specifying GLOBAL for the TemplateName attribute. Whenever you create a site, the global site definition is applied, so your feature is also applied.

Workflow

Use a workflow feature to attach a custom workflow to SharePoint. The feature includes the code for the workflow and the necessary forms for each step.

Document Converter

Document converters automatically convert a document library item from one format to another. WSS does not offer document converters, but MOSS includes several (for example, to convert documents to HTML) and third-party converters to support conversion to PDF and other formats.

Site Columns and Content Types

In features, you define site columns with a Field element. All of the core site columns are defined in a feature named fields that is activated by the global site definition. You can use the fields feature as a reference when creating your own site columns or content types.

Just as the global site definition activates the fields feature for site columns, the ctypes feature is also activated globally for content types. You can create a new content type with a feature using the ContentType feature element.

Sometimes, you will need to associate a content type with an existing list or alist that another feature created as part of a larger solution. Use the ContentTypeBinding feature type for that task.

Lists

You can define a new type of list—including content type associations, views, and custom forms—with a ListTemplate feature. Each of the standard lists and libraries is defined by a ListTemplate feature element. For example, the DocumentLibrary feature defines the Document Library template.

You can create new list instances by using ListInstance to specify the target URL and the list template that defines the list.

SharePoint exposes a rich event model for lists that allows custom code to run whenever something happens to a list or an item. Use the Receivers feature type to associate the assembly and a class that contains a handler for a specific event type to all lists defined by a particular list template.

Module

The Module feature allows you to deploy files to a site. You can use it to add files to a library or simply place the files onto the site in a specified folder. In the latter case, the module creates the folder if necessary.

Control

You might expect the Control feature to install controls, but it doesn’t. Many of the core site pages use a Web control named DelegateControl. DelegateControl is a placeholder; when the page renders, it loads a concrete control instance that is based on an ID and a sequence number. DelegateControl looks for the lowest sequence number of a given ID and loads
the associated control. Individual Control features define the IDs and sequence numbers.

This feature allows site owners to override existing controls with their own specialized instances on existing sites, without altering the sites or their definitions. A common use of this technique is to replace the basic search control, which is defined by a DelegateControl on the master page with an ID of SmallSearchInputBox. You can replace this control when you brand a site by deploying your own control or Web Part and then creating a Control feature with the SmallSearchInputBox identifier and a low sequence number.

Custom Actions

Just as Control allows you to insert controls in defined placeholders without changing the target site or pages, the Custom Actions feature allows you to insert or hide links on pages and menus. CustomAction and HideCustomAction both require that you specify a location, and they affect the resulting page without directly altering its definition.

Use Custom Actions to show or hide different elements of the site, including the contents of many drop-down menus such as site actions, personal settings, list settings, and item edit menus. You can also use Custom Actions to show and hide links on the Site Settings page and on the Create Libraries, Lists, And Sites page. Custom actions enable greater control of additional navigation within the site than you can accomplish with the top-level menus.
You can use custom actions to display an option on the edit item menu of a list or document library’s items. For example, you could display a link to a function that merges a contact item’s data with a document template to create a form letter.

New Feature Elements in 2010

SharePoint 2010 adds a number of feature elements to the schema.

Property Bag

The PropertyBag element allows you to add properties to items in a site. The Save Site as Template functionality uses PropertyBag to create solutions that can duplicate the source site with high fidelity.

When using a PropertyBag to target a file, the use is identical to the Properties child element of the File element within a module. The difference is that the PropertyBag is independent of the need to deploy the file. In other words, you can apply properties to items that already exist.

Web Template

The WebTemplate element provides an alternative to traditional site templates. In most cases this element is now the preferred method for creating new templates for custom sites.

Workflow Association

The WorkflowAssociation allows declarative association of a workflow template to a list, content type, or site. Previously you had to use managed code to create a workflow association. Managed code is still a fully supported option.

Others

The feature schema definition, wss.xsd, includes four other workflow elements that are currently undocumented and unused by any of the built-in features that come with SharePoint 2010. They are:

  • Workflow Actions
  • Web Part Adder Extension
  •  User Migrator
  • Group Migrator

Doug (SPC  towards the end of the smile clip)This post is an excerpt from the online courseware for our Microsoft SharePoint 2010 for Developers course written by expert Doug Ware.

Doug Ware is a SharePoint expert and an instructor for many of our SharePoint 2007 and SharePoint 2010 courses. A Microsoft MVP several times over, Doug is the leader of the Atlanta .NET User Group, one of the largest user groups in the Southeast U.S., and is a frequent speaker at code camps and other events. In addition to teaching and writing about SharePoint, Doug stays active as a consultant and has helped numerous organizations implement and customize SharePoint.

Site Collections

Thumbnail for 597When you access a SharePoint site with any type of client application, including the browser, you are first accessing a site collection that contains the site you ultimately want to access.

A site collection contains one top-level, or root, web, and zero or more subsites. The site collection acts as the root unit of authorization for all the webs it contains and it can exist at the root of a Web application or under another site collection.

A very important difference between a site collection and a web is that the site collection acts as a boundary for both security and aggregations. This distinction often trips people up and can cause some frustration. SharePoint has a number of mechanisms for querying and aggregating information, but they are generally limited to the confines of a site collection.

Most SharePoint items with which a user interacts exist within the context of a site collection, and an individual user can have permission to access many site collections. However, each site collection has different permission sets. In this respect, you can think of query visibility as similar to the data in two different databases that you want to aggregate by using a SQL query. In the case of databases, you generally have to use some sort of extension or intermediate step to create the correct result set. The same is true of data in two site collections.

Logical Site Hierarchy Example

It is tempting to think of a site collection as the top of a hierarchy of webs, as shown in Figure 1, because a site collection is assigned a URL when a user creates it, but this is not correct.

SiteCollections1Figure 1. A site is not the root of a hierarchy of webs.

Single Site Collection Example

A more accurate depiction of a site collection is as a container that has one or more webs. The root web uses the URL that the user specifies during the site collection’s creation.
Consider a simple company portal that is configured as follows:

  • Mycorp.com
    • Mycorp.com/Accounting
    • Mycorp.com/HR
    • Mycorp.com/HelpDesk

This topology is certainly functional, but what if the Accounting web needs a different security model and is the property of the accounting department including responsibility for user management? If so, it is possible to preserve the URL scheme with a little extra configuration and use multiple site collections instead of a single site collection containing every subsite.

Partitioning with Site Collections

By default, when you create a new site collection using SharePoint Central Administration, the URL will be something like http://myserver/sites/newsite.

The sites portion of the URL is called a managed path. Conversely, the page to create a new subsite allows you to specify the URL without the sites element, and if you want to create newsite as a subsite instead of a site collection, the URL will be http://myserver/newsite.

Consider the example shown in Figure 2. This URL scheme requires additional configuration to implement, but duplicates with site collections the URL scheme of the subsite for the accounting web.

SiteCollections2Figure 2. Managed paths allow control
when using multiple site collections in a 
single Web application.

You can duplicate the URL scheme used for a subsite with a site collection by defining a managed path.

doug (frame 367 of smile clip)This post is an excerpt from the online courseware for our Microsoft SharePoint 2010 for Developers course written by expert Doug Ware.

Doug Ware is a SharePoint expert and an instructor for many of our SharePoint 2007 and SharePoint 2010 courses. A Microsoft MVP several times over, Doug is the leader of the Atlanta .NET User Group, one of the largest user groups in the Southeast U.S., and is a frequent speaker at code camps and other events. In addition to teaching and writing about SharePoint, Doug stays active as a consultant and has helped numerous organizations implement and customize SharePoint.

Social Tagging in SharePoint 2010

As you read earlier, folksonomy is a community-driven mechanism for categorizing data where the keywords are driven by end users instead of designated taxonomists. SharePoint 2010 now offers support for folksonomy via Social Tagging. Social Tagging allows end users to tag pages with Keywords for future reference or to share with colleagues.

When a user tags a page, SharePoint searches for a Keyword or Term that matches the tag. If a match occurs then the existing Keyword or Term is used. If, on the other hand, a matching Keyword or Term is not found, then SharePoint creates a new Keyword and stores it in the special Keywords Term Set. By default, everyone can add new Terms to this special Term Set. As you would expect, the Keywords Term Set uses an open submission policy, which allows all users to contribute entries.

NOTE     Terms in the Keywords Term Set are called Keywords, not Terms.

Keywords do not support any type of hierarchy or relationship. Keywords can only exist under the Keywords Term Set and only in one flat structure.

When tagging a page, the user has the option of either marking the tag public or private. If the tag is marked as private others will not be able to see that the page was tagged, but the Keyword will be created in the Keyword Store and available for others to use. Also, if a page has been tagged by someone but the tag was marked as public, anyone else who tags that page will see that tag as a suggestion. Because of this, users should be properly trained on how to use tags to prevent tags of a sensitive or confidential nature from being inadvertently created.

Over time, certain Keywords may gain wide acceptance. In such cases, it may be useful to promote them by moving them from the Keywords Term Set to another, more formal Term Set. In this way, a Term can be promoted from a folksonomy model (Keyword) to a taxonomy model (Term). If Social Tagging is used in conjunction with SharePoint’s My Sites feature,
then in addition to tagging pages it is also possible to add notes about a page. Notes are stored on a user’s My Site for later retrieval and are viewable by everyone.

 

John.UnderwoodThis post is an excerpt from the online courseware for our Microsoft SharePoint 2010: Enterprise Content Management course written by expert John Underwood.

John Underwood is a technical evangelist for a SharePoint consulting company, with 30 years of programming experience, including 20 years on the Microsoft platform and 10 years with .NET. John also has extensive experience using, configuring, and programming SharePoint.

 

 

SharePoint 2010 Search

The need for enterprise search is a key driver for implementations of Microsoft SharePoint 2010 Search. The out-of-the-box SharePoint Server search features are useful, but getting the most benefit from SharePoint Server search requires configuration and customization.

The SharePoint Server object model makes it possible for application developers to implement powerful custom functionality, but in many cases you can meet requirements by configuring a site in the browser. This chapter focuses on customization of search by using the out-of-the-box features. SharePoint Server comes with two search site definitions you can use as a basis: Basic Search Center and Enterprise Search Center. Both site definitions create pages that contain Search web parts. You can use these web parts to extend sites based on the site definitions. You can also use them to create custom search pages in sites based on any site definition simply by enabling the correct set of features.

SharePoint Server does not simply provide the capability to perform searches. It also enables you to tune and improve your search results to provide the most relevant information to your users. When you consider the potential reduction in the cost of time spent looking for information and the cost of duplicated effort, it is easy to understand why customizing search is worthwhile. To this end, SharePoint Server includes reporting and optimization tools for search. With this information, you can define different types of search by defining search scopes. For example, you can create a scope to support search pages that enable users to find people within a geographic location or find documents of a particular type.

SharePoint 2010 also adds a new search feature knows as refiners. Refiners, and the accompanying Refinement Panel Web Part, provide users with a quick look at the kinds of matches they are getting. It also provides a meaningful way for users to whittle down the results by key areas such as document type, author, and origin of the search result.

You can also promote specific content based on its importance or relevance. You can specify the “best bets” for searches based on specific keywords. You can improve the quality of your keywords and best bets based on what you learn by analyzing the site’s usage reports.

Basic Search Center

As the name implies, the Basic Search Center site template provides basic
search functionality. A new site based on this template has several applications
pages, including:

  • default.aspx for entering search queries.
  • results.aspx for showing search results.

Basic Search Center supports minimal customization, and does not permit the addition of new pages. Basic Search Center works with all versions of SharePoint 2010. (For a comparison of search capabilities in versions of SharePoint 2010 visit http://go.appdev.com/?id=SXEG).

Enterprise Search Center

The Enterprise Search Center (formerly known as Search Center with Tabs) is designed to provide greater scalability and customization than that Basic Search Center template. Enterprise Search Center is available with SharePoint Server 2010 Standard and Enterprise editions. In order to use the Enterprise Search Center, the SharePoint Server Enterprise Site Collection feature and SharePoint Server Publishing Infrastructure feature must be enabled (see Figure below).

ECM Ch05 Blog.pdf - Adobe Acrobat Pro

The Figure above. Required features for using Enterprise Search Center.

When it comes to customization, there are two significant differences between Basic Search Center and Enterprise Search Center. First, Enterprise Search Center includes a Pages library where you can create, customize, and publish search pages. Second, Enterprise Search Center includes the ability to provide tabbed search pages. The out-of-box template includes tabs for All Sites and People. You may modify the tab to include custom pages, scopes, etc.

 

John.UnderwoodThis post is an excerpt from the online courseware for our Microsoft SharePoint 2010: Enterprise Content Management course written by expert John Underwood.

John Underwood is a technical evangelist for a SharePoint consulting company, with 30 years of programming experience, including 20 years on the Microsoft platform and 10 years with .NET. John also has extensive experience using, configuring, and programming SharePoint.

Business Connectivity Services

While the lists, libraries, and other features of SharePoint provide a useful platform for collaboration, SharePoint doesn’t operate in a vacuum. Users will frequently interact with external applications, such as line-of-business applications, alongside their regular use of SharePoint. At some point users may express a desire to have SharePoint integrate with external systems. It could be as simple as a desire to do everything possible within SharePoint; or, it may be a need to integrate data from an external source into a SharePoint list or library in order to enforce a business rule or to avoid duplicating data in
multiple sources.

Business Connectivity Services, or BCS, exists to connect to external data. BCS represents a significant upgrade to the Business Data Catalog offered in SharePoint 2007. Specific improvements include:

  • Simple support for Write operations (no coding required).
  • Excellent tool support with SharePoint Designer 2010 and Visual Studio 2010.
  • External Lists for surfacing BCS data as a SharePoint list.
  • Support for both server object model and client object model.
  • Integration with Microsoft Office client applications.

NOTE Microsoft made an unfortunate choice when it comes to the use of the acronym BDC. In SharePoint 2007 BDC refers to Business Data Catalog; in SharePoint 2010 BDC refers to the Business Data Connectivity service, which is a subsystem of Business Connectivity Services. For the remainder of this chapter, BDC refers to SharePoint 2010 Business Data Connectivity service unless otherwise noted.

BCS Architecture

There are several key components that make up the BCS architecture. These components work together to provide a complete solution for integrating external data.

BDC Metadata Store

The BDC Metadata Store is responsible for storing External Content Types. As you will see in a later section of the chapter, External Content Types provide metadata and connectivity information for external sources of data. The BDC Metadata Store may be updated via SharePoint Designer when creating or updating external types.

BDC Server Runtime

The BDC Server Runtime uses the contents of the BDC Metadata Store to reach into external systems and perform operations such as reading or writing data. These read/write operations are carried out without the need for custom code.

BCS Security

BCS Security provides authentication and authorization for browser-based clients as well as Microsoft Office clients. It is capable of passing the user’s credentials through to the external system, or impersonating a dedicated account to the external system on behalf of the user. BCS Security also supports claims-based authentication.

SharePoint User Interface

BCS continues the SharePoint 2007 model of exposing external data via web parts. However, it also provides the new External List to present external data to the user via the SharePoint browser-based user interface. The presentation of these External Lists are seamlessly integrated with other lists on a particular SharePoint site.

Design Tools

SharePoint Designer 2010 provides full support for creating BCS solutions, including the creation of External Content Types, the definition of External Lists, and the definition of InfoPath for presenting external data. Visual Studio 2010 builds upon this foundation and allows developers to further extend BCS capabilities, such as a scenario where significant transformation of the external data is necessary.

 

John.UnderwoodThis post is an excerpt from the online courseware for our Microsoft SharePoint 2010: Enterprise Content Management course written by expert John Underwood.

John Underwood is a technical evangelist for a SharePoint consulting company, with 30 years of programming experience, including 20 years on the Microsoft platform and 10 years with .NET. John also has extensive experience using, configuring, and programming SharePoint.

 

User Profiles and My Sites

Although you can view and modify a user’s profile properties in Shared Services Administration, your users cannot, and they need a way to update their information. SharePoint Server provides this functionality with My Sites. However, My Sites have much more functionality than the basic ability to work with profile properties.

A My Site is a self-service personalized site that contains private pages that are visible only to the owner of the site. A My Site allows consumption and manipulation of data of interest to the owner—a private dashboard. It also contains pages that are visible to the public and/or the site owner’s colleagues.

My Sites also serve an important role in creating a unified experience between SharePoint and the Office client applications and in targeting links to specific audiences based on profile data.

Configuring My Sites

You configure My Sites by using SharePoint Central Administration and The User Profile Service Application page you used earlier in the chapter. A My Site uses a normal site definition. The site definition specifies a dependency that requires you to create My Site instances only within a specialized site collection based on the My Site Host site definition. You can create a My Site Host by using either the standard Create Site Collection page or by specifying that SharePoint create one automatically when you create a new User Profile
Service Application.

A single instance of the User Profile Service Application supports exactly one My Site Host. However, it is possible to have more than one instance of the User Profile Service Application in an environment, and therefore more than one My Sites host. This is common in large portals that span multiple geographic locations. The My Sites Settings configuration includes:

  • Setup My Sites: Specifies the location of the My Site Host as well as the managed path for My Sites.
  • Configure Trusted Host Locations: Connects multiple instances of the User Profile Service Application.
  • Configure Personalization Site: Adds personalization site navigation links to the My Site left navigation.
  • Publish Links to Office Client Applications: Publishes links to SharePoint sites and lists when opening and saving documents from Office client applications.
  • Manage Social Tags and Notes: Finds, manages, and deletes social tags.

Linking to Office Client Applications

You can cause a user’s My Site to associate specific document libraries with their local machine profile. These libraries will appear in the Save dialog box when users work with Microsoft Office applications. This important functionality can encourage users to save public documents to appropriate libraries. Without this functionality, they are much less likely to put their documents in appropriate locations because they must manually add the
locations.

You can target links to users with simple rules based on information found in their profile or by their group memberships.

Personalization Links

You can also target links to appear on a My Site’s Quick Launch menu by creating personalization links. Personalization links, like links to Office client applications, are an invaluable way to direct users to content without a lot of effort or training.

As with links to Office applications, you can target personalization links to users with simple rules based on information within their profiles or by their group memberships.

 

John.UnderwoodThis post is an excerpt from the online courseware for our Microsoft SharePoint 2010: Enterprise Content Management course written by expert John Underwood.

John Underwood is a technical evangelist for a SharePoint consulting company, with 30 years of programming experience, including 20 years on the Microsoft platform and 10 years with .NET. John also has extensive experience using, configuring, and programming SharePoint.