BCS is implemented as a service application, known as the Business Data Connectivity (BDC) service application,
which is named for the fact that it is the component that connects to
the external system and passes the data to the presentation layer. You
create external system definitions once, and not only share those
definitions to many sites within the same site collection or SharePoint
web application, but also share those definitions with more than one
web application.
In addition, a SharePoint farm—a SharePoint installation that is
installed on one or more servers that share the same SharePoint
configuration database—can host more than one BCS; each one can be
configured independently by different sets of administrators. By
storing external system definitions stored in a BCS on one SharePoint
farm, which can be referenced from other SharePoint farms, you can
manage all your external system definitions centrally. Once the
external system definitions are retrieved, each SharePoint farm will
connect directly to the external systems. A BCS can also be partitioned
in a multitenancy configuration, which is the term commonly used to
describe the isolation of websites in a hosting environment, such as
SharePoint Online.
Although multiple BDC service applications can exist, the browser
and SharePoint Designer can use only the BDC service application that
is labeled as the default BDC service application. If you associate a
web application with multiple BDC service applications, you can use the
nondefault BDC service applications only with custom code.
BCS may be divided into four areas:
-
External system
. This is where the external content resides. It may be
maintained by one of your organization’s business critical
applications, often known as line-of-business (LoB) applications. They
may have a custom UI or a programmable interface, such as Open Data
(OData), Microsoft Windows Communication Foundation (WCF) service, web
2.0 source, or as a database.
The OData data source type is newly supported for BCS in SharePoint
2013, and is used by many systems, including SharePoint, SSRS, Windows
Azure Table Storage, Azure Data Marketplace, Facebook, Netflix, and
others, such as those built using Open Government Data Initiative
(OGDI), as well as the Microsoft .NET Framework. In fact, Windows
Server 2012 includes a new feature that enables you to expose Windows
PowerShell commands and scripts as OData Web service entities. Data is
returned from the OData producers as JavaScript Object Notation (JSON),
Atom, or plain XML data.
Before
using BCS, you should explore the external system you wish to connect
to (for example, evaluate the best method of connecting to the external
system). Check with creators of the external system as to the methods
available to access the content. If there is more than one method, ask
which one is the best option to use. -
Connectivity
. Before SharePoint can access the content from an
external system, the definition on how to connect to the system and the
authentication method used must be created, which is the BDC model. The
BDC model consists of declaration XML that describes the external
system you want to access, as well as the operations you might like to
use on this external content—for example, read a list of data, read one
item (row) of data, or update one item (row) of data.
The BDC model can be created on a development or test SharePoint
installation, from where it can be downloaded and imported into the
SharePoint production farm, where it is stored in the BDC metadata
store, or it can be used by Office applications.
The BDC model can be used in a SharePoint installation to create ECTs, which are also known as entities.
However, in a SharePoint 2013 installation, before you can create or
upload a BDC model, you must create the BDC service application. Office
2013 applications contain only the components that allow you to upload
a BDC model; therefore, there is no management or configuration
interface provided. -
Presentation
. This is the client-side consumer of the external
content, such as an Office 2013 application, or if you are using
SharePoint, it could be an external list created from the ECT. As with
SharePoint 2010 and Office 2010, you can use external data with Office
client applications such as Word, Access, InfoPath, Excel, and Outlook.
New with Visio 2013, you can now link data from an external list to a
diagram and its shapes. Word and Visio can use only data from external
systems, whereas Access, InfoPath, Excel, and Outlook can create, read,
update, and delete data in the external system if the ECT is configured
to complete those operations and the user is allowed to complete those
operations. -
Tools
. Microsoft provides two tools to create the BDC model
to interact with the BCS program interfaces and manipulate the BDC
objects. These are SharePoint Designer 2013 and Visual Studio 2012.
There are other third-party tools that can help ECT designers, such as
BCS Meta Man, which can be found at lightningtools.com. You could also use an XML editor, such as XML Notepad 2007 or Notepad, to create a BDC model.
Figure 1
shows the high-level interaction among these four areas. Notice the
symmetry—the BCS architect is the same for Office 2013 applications as
it is for a SharePoint installation. However, the Office 2013
applications do not have a BDC metadata store. In its place is a BDC
client-side cache, so that when content in an external list is taken
offline, the BDC model is taken from the BDC metadata store on the
server and stored in the BDC client-side cache. The offline content
from the external list is also stored in the client-side cache, which
uses a SQL Compact Edition client database so that the offline external
content and the BDC model are both persisted when the user’s computer
is shut down.
Also note in Figure 1
that the Office 2013 applications have their own connectors; therefore,
when a user switches to online mode, the Office application connects
directly to the external content without connecting through SharePoint.
Other Office 2013 applications, such as Access 2013, can import a
client-side version of the BDC model. Thus, in this scenario, Access
2013 does not need to connect to SharePoint at all; it connects
directly to the external system. This could potentially create
challenges for users when accessing data hosted in SharePoint Online,
as well as accessing on-premise data.
To use the Office 2013
applications, a user must have the application installed on Windows 7
or later and have the following three software components:
If these three components are not installed when the user tries to
connect to data within an Office application via BCS, the user will be
prompted to download and install them. In addition, the Office client
applications must be installed with the Business Connectivity Services
Office Shared Feature, as shown in Figure 2.
The advantage of using BCS over using the Data Source gallery in
SharePoint Designer is that you need to define the external system and
ECT only once; you can then use that ECT on many sites across all web
applications that are associated with the BDC service application. One
disadvantage. For example, is that ECT designers must be given edit
permissions to the metadata store, which requires a high level of
security, whereas with the Data Source gallery, you only need to be a
site owner. In addition, other BCS security settings are needed to
allow users to access the external content that can only be set using
the SharePoint 2013 Central Administration website or Windows
PowerShell. This results in a level of collaboration between the ECT
designers and the SharePoint farm administrators, which in large
organizations are usually two different people.
To connect and retrieve data from an external system, complete the following tasks:
-
Create a BDC service application and set permissions on the BDC
metadata store to allow for the creation of the BDC model, external
system definitions, and ECTs. -
Define the external system connection. -
Define the operations to Create, Read, Update, and Delete (CRUD)
content stored in that external system as appropriate to your business
requirements. -
Create an ECT based on an external system definition. -
Configure the permissions on the ECT so that users can see content from the external system. -
Use the ECT to present the data from the external data
source as external lists, an external data column, web parts, or from
within an Office application.
|