Solutions that leverage Business Connectivity Services (BCS) typically fall into one of three high level categories:
The first two do not require the use of code, although they can re-use code-based components that have been published by developers. This is important for two reasons:
The Advanced category is entirely code-based, leveraging Visual Studio as the environment to compose and publish re-usable components or entire end-to-end solutions.
Figure 1: Three different types of BCS solutions, types of users who create them, the tools used to create them, and common scenarios that can be accomplished with each.
Let’s review the characteristics and benefits of each type of solution:
In SharePoint Foundation 2010, you can surface external data in an external list or on a web part page via the Business Data web parts or the Chart web part. You can also add an External Data column to a standard SharePoint list or document library. That column can then be exposed as a Quick Part (aka content control) in Microsoft Word.
In Outlook 2010, you can take an external list offline from SharePoint Server 2010 with Enterprise Client Access License and allow users to interact with the external data from within Outlook. Users see the same formatting (contact, appointment, task or post) as regular Outlook items and can use the same gestures to interact with them. This type of solution runs under the native BCS Outlook Add-in, which is installed with Office 2010 and loaded at Outlook startup.
In Microsoft SharePoint Workspace 2010, you can take an external list offline from SharePoint Server 2010 with Enterprise Client Access License and allow users to interact with the external data from within SharePoint Workspace. Business Connectivity Services does not provide an extensible programming model to extend this type of a simple solution, but you can associate an InfoPath Form with the External List, which then opens up the ability to customize the form and present that customized form on both the server and on the client in SharePoint Workspace.
Users in Outlook and SharePoint Workspace can synchronize data directly with the external system(s) on an automatic basis (default is 3 hours) or by explicitly clicking an action. They can also check for updates to the external list – i.e. The structure of the external list, its forms or views.
You create external content types by using SharePoint Designer, Visual Studio, or an XML editor. Then, you create an external list using the browser or SharePoint Designer and click a button in the SharePoint ribbon to connect it to Outlook or SharePoint Workspace. Web part pages and external data columns can be created using the browser or SharePoint Designer.
The most common types of Intermediate solutions are Simple solutions that have been further customized to add capabilities. These additional capabilities include InfoPath forms, SharePoint workflow, and SharePoint web part pages. You can customize InfoPath forms that present External Data by changing the look and feel, adding declarative rules/business logic, or adding code-behind. The latter requires the form to be published as an admin-deployed form to the server – consult the InfoPath 2010 documentation on MSDN for more information about these capabilities, walkthroughs and samples. You can also create or add capabilities to SharePoint workflows through SharePoint Designer by either a) configuring the out-of-box SharePoint List activity to read data from, or write data to an external list, or b) re-using a custom workflow activity built in Visual Studio (and published to SharePoint) that interacts with external lists or the BDC runtime object model. Finally, you can create web part pages that leverage out-of-box web parts (Business Data Item, List, Related List, Actions, Item Builder, and Filter as well as the Chart web part) and optionally configure part-to-part connections to send data between them. The look and feel of parts can be customized by editing the XSLT of each part in the web part toolpane.
Another type of Intermediate customization involves external data in Outlook 2010. An example of a common scenario that can be enabled in this space would be showing related Order information in a custom taskpane when a user has a Business Contact inspector open.
Starting with basic Outlook elements, you can customize the view that is shown for a folder of external data. This is done by opening the folder in Outlook and using the standard commands to build and save a new view. BCS provides a command to save the customized view to SharePoint and place it a sub-folder of the External List, making it available to future users who connect the list to Outlook.
Additional Outlook customizations are slightly more complex than other Intermediate customizations and require the creation of XML files (for example, BDC Model, Solution Manifest (OIR.Config), Subscription, Ribbon, and Layouts) and then a ClickOnce package by using BCS SDK tools. Users can then deploy the solution in Outlook by installing the ClickOnce package. In such a solution, you can define custom taskpanes and present external data to users via External Data Parts (either out-of-box or code-based custom parts) hosted in a taskpane. You can also define ribbon files and custom actions (exposed in the ribbon or in an external data part) that either trigger code or launch a browser pointing to a URL. Finally, you can customize Outlook forms by starting with the auto-generated forms that BCS provides, tweaking them and saving/exporting the file(s). Customizations here leverage the Business Connectivity Services rich client runtime (including the BCS Outlook add-in) which presents the elements defined in the XML files at runtime.
A variety of tools including InfoPath Designer (for forms), SharePoint Designer (for workflows), a browser (for SharePoint web part pages) and Outlook (for customized forms and views) can be used to build intermediate solutions.
To create the XML files needed for your Outlook declarative solution, you can use any XML editor. Visual Studio can provide IntelliSense, which can be helpful when creating these XML files. Samples to get you started will be available as part of the BCS Developer documentation and SDK resources on MSDN. Business Connectivity Services provides an SDK tool that can be used to create a ClickOnce package for Outlook declarative solutions.
These solutions can involve the creation of reusable components (.net assembly connector to aggregate or transform data from external systems, custom web parts, custom workflow activities, code-behind for InfoPath forms, and code-based actions or external data parts for use in Outlook declarative solutions) or an entire end to end solution that leverages the public Business Connectivity Services object model.
A code-based Microsoft .NET Framework solution created in a tool such as Visual Studio can use any element of the public Business Connectivity Services object model and can enable users to interact with external data. It can register with the Business Data Connectivity (BDC) service by using the BDC object model to present data in SharePoint, an Office 2010 application such as Microsoft Excel, or a custom application. This object model is installed with SharePoint Foundation 2010 and Office 2010. External data can be retrieved directly from the external system while connected, or it can be retrieved locally from the BCS rich client cache provided that it’s already available (typically achieved by taking external lists offline to SharePoint Workspace or Outlook). This type of solution can be used to extend BCS to Office applications that are not supported out of the box, such as Excel or PowerPoint.
In a code-based end to end solution, the developer controls all of the user interface, packaging, and deployment. This type of solution cannot make use of the Business Connectivity Services rich client runtime, which is used by Simple and Intermediate solutions to integrate data into Office applications.
Code-based solutions are developed in a tool such as Visual Studio 2010. A BDC project type is available to facilitate the creation of .net assembly connectors.
To summarize, there’s a broad spectrum of solutions that can be built using BCS. These range from simple solutions that rely on out-of-box capabilities with little or no customization, to intermediate solutions that involve customizing a wide range of features in SharePoint and Office 2010. Advanced solutions involve the creation of code via Visual Studio, and can either be complete end to end solutions, or provide re-usable code-based components that can be included in an intermediate solution.
This post was updated 11/20/2009
- Brad Stevenson, Sr. Lead Program Manager