BCS Tooling Investments in 2010: Part 1

One of the most popular requests around the Business Data Catalog (BDC) in Microsoft Office SharePoint Server 2007 is for additional tooling support. Business Connectivity Services (BCS) is the evolution of BDC, so for this release we have made big investments in SharePoint Designer 2010 and Visual Studio 2010 to facilitate the creation of SharePoint solutions that leverage Business Connectivity Services. With a set of new BCS capabilities in these two applications and the documentation, guidance, samples and utilities included in the SharePoint SDK, we expect to empower a broader audience ranging from power users to advanced code developers to create solutions that integrate external data.

In a previous post, Brad Stevenson introduced the different types of solutions enabled by BCS. In this post series I’d like to provide an overview of the tools you can use to create them. As I explained in Introducing the External Content Type, External Content Types (ECTs) are the basic building block for creating these solutions so you will see that the most prominent tooling investments are around External Content Type authoring. Both SharePoint Designer 2010 and Visual Studio 2010 offer External Content Type designers, however they target different scenarios, types of data sources and audiences. Let's start by taking a look at the new BCS capabilities in SharePoint Designer 2010.

SharePoint Designer 2010

SharePoint Designer provides a “no code” experience for composing (composing refers to the fact that the solution author assembles a solution out of existing reusable components as opposed to building it from scratch) simple to intermediately complex solutions based on External Content Types which you can author through a wizard-driven user interface. Once an External Content Type is created, you can easily create and customize External Lists, Web Part Pages, Workflows and Forms that are based on it. Let me describe how each of these tasks is supported in SharePoint Designer 2010.

External Content Type Authoring

When you open a site in SharePoint Designer 2010, you will now notice a new gallery and designers for authoring External Content Types. The gallery allows you to access the list of External Content Types published into the shared BCS metadata store (formerly known as the Business Data Catalog). The designers support connectivity to SQL Server databases, WCF services (including Web Services) and .Net assemblies (previously created by a code developer). The modeling approach is to discover and map the data schema and operations exposed by the external data source to the desired schema and stereotyped operations (Read Item, Read List, Create, Update and Delete) of your External Content Type. Because of this, it is necessary that the interface exposed by the external data sources is “BCS friendly” for SharePoint Designer 2010 to be able to consume it. Direct access to individual database tables is always considered “BCS friendly”. For stored procedures, WCF services, Web Services and .Net assemblies, I recommend you to read the series of posts in which Sanjay Rama describes how to design BCS friendly interfaces.


Figure 1. Screenshot of the new External Content Type gallery showing the External Content Types currently published to the shared BCS metadata store.

SharePoint Designer 2010 also allows you to define associations between External content Types based on foreign keys. This is done by configuring stereotyped association navigation operations that enable retrieval of associated External content Type instances.

In addition to data schema, stereotyped operations and associations, SharePoint Designer 2010 allows you to configure the Office integration behaviors of you External Content Type. For example, you can configure data filters, search support, data offlining into Outlook and SharePoint Workspace, as well as mappings to native item types like Contact, Task, Appointment and Post.

SharePoint Designer 2010 supports the most common external data connectivity scenarios; however there are advanced connectivity behaviors that are not supported like bulk and batch operation stereotypes, generic/polymorphic services, associations not based on foreign keys, etc. In future posts we’ll cover how to deal with these advanced scenarios.

External List Authoring

Once you have an External Content Type defined, SharePoint Designer 2010 allows you to create External Lists based on it. This can be done through an auto-generate option available in the External Content Type’s summary page or by choosing the new External List option in the Lists gallery.

InfoPath Form Generation and Authoring

SharePoint Designer 2010 allows you to “upsize” any External List to use InfoPath forms instead of the standard SharePoint forms. You can choose to auto-generate InfoPath forms when you create a new External List or you can generate forms for existing lists. The auto-generated forms are fully functional and ready to use, except for the cases where one or more fields on your External Content Type are considered “complex”. We’ll talk more about complex fields in future posts, for now let’s simply define a complex field as one which data type involves a structure that goes beyond a simple value, for example and address structure that includes street, city, state and country. In this case a form will be generated, but manual customization of the form may be required to make it functional. In any case you can always customize existing External List InfoPath forms using the full power of InfoPath Designer 2010 which has been extended to provide an integrated form customization experience when launched in the context of an External List.

External Data in Workflows

In the workflow space, SharePoint Designer 2010 allows you to access external data by authoring workflows that interact with External Lists. The read and write workflow activities for regular SharePoint lists have been extended to support External Lists. This means that the authoring experience is as simple and flexible as you know it for regular lists, with the additional benefit of being able to access an external data source.

Note that External Lists themselves do not support triggering workflows. However in SharePoint Designer 2010 you can create a site level, list level or reusable workflow that accesses one or more external lists.

Web Part and Profile Pages

SharePoint Designer 2010 offers general support for authoring Web Part Pages which allows you to create custom pages based on the External List and/or the BDC Web Parts. Specific to BCS, SharePoint Designer 2010 allows you to auto-generate Profile Pages for an existing External Content Type. A Profile Page is a special type of Web Part Page that shows a 360 degree view of an External Content Type instance by showing its details as well as its associated External Content Types. Profile Pages are the default target of external data search result links.

If you need to integrate external data into SharePoint and Office without writing code, SharePoint Designer 2010 will probably be your best bet.

In the following post we will go through the design experience in Visual Studio 2010, how it supports complex code-based data integration scenarios, and the interoperability between SharePoint Designer 2010 and Visual Studio 2010.

- Rolando Jimenez Salgado, Sr. Lead Program Manager