Benutzer:MovGP0/SharePoint/BCS

aus Wikipedia, der freien Enzyklopädie
Zur Navigation springen Zur Suche springen
   MovGP0        Über mich        Hilfen        Artikel        Weblinks        Literatur        Zitate        Notizen        Programmierung        MSCert        Physik      

Business Connectivity Services Architecture

External Content Types

[Bearbeiten | Quelltext bearbeiten]
  • Describe the schema of external data source
    entity-relationships: 1:n, self-reference, reverse, ...
  • operators/operations on external data
  • defined using SharePointDesigner or VisualStudio
  • export/import external content types wia Bsusiness Data Connectivity service application
  • Exposed as SharePoint List
  • CRUD-Q functionality
  • Forms can be converted to InfoPath forms
  • Access to SharePoint object model (SPList)
  • SharePoint does not own the data; some list functionality not available (ie. Workflows)
  • SharePoint 2013 supports notifications

Exposing External Data

[Bearbeiten | Quelltext bearbeiten]
  • External Data Columns
    • add data from external content types to standard SharePoint lists
    • can be made available as content controls in Microsoft Word
  • Provided Web Parts
    • external data item
    • external data list, external data related list
    • external data item builder
  • Profile Page
  • External Data Search
    integrate external data in search results
  • Inclusion in SharePoint Apps
ECT creation options
SharePoint Designer Visual Studio
  • Creating ECTs to external systems
    • SQL Server databases
    • WCF services
  • map operations for external systems
    • mapping SQL columns to predefined (semantic) Microsoft Office Datatypes
    • filter
  • reuse existing connections
    custom connector
  • surface external data
    external lists, office clients
  • create custom connectors
  • create .NET assembly connector
  • create ECTs to OData source
  • include ECTs within SharePoint Apps
  • ECTs that support Notifications and External Events
  • aggreagate data across multiple external systems
  • customizable data transformations
Enabling access to external datasource
→ Central Administration
→ Manage service applications
→ select created contetnt type
→ set roles/permissions for service app
BDC throttling & ECT filter
Type Scope default max
connections global 100 500
items database 2000 25000
timeout database 60s 600s
size service 3MB 150MB
timeout service 60s 600s
  • use PowerShell to change default settings
  • implement ECT finder & SpeficicFinder method filter to limit the amout of returned data
Authentication Option
(most common)
OData, WCF Service Connector Database Connector .NET Assembly Connector
SQL Auth Ja Code
Username & Password Ja Ja Code
NTLM Passthrough Ja Ja Ja
Claims Token Ja Nein Code
OpenID, LiveID Code Nein Code

OData backed ECT's

[Bearbeiten | Quelltext bearbeiten]
<?xml version="1.0" encoding="utf-8"?>
<LobSystam Name="ODataWebNorthiwndModel" Type="OData">
   <Properties>
      <Property Name="ODataServiceMetadataUrl" Type="System.String">http://services.odata.org/Northwind/Northwind.svc/$metadata</Property>
      <Property Name="ODataMetadataAuthenticationMode" Type="System.String">PassThrough</Property>
      <Property Name="ODataServicesVersion" Type="System.String">2.0</Property>
   </Properties>
   <LobSystemInstances>
      <Properties>
         <Property Name="ODataServiceUrl" Type="System.String">http://services.odata.org/Northwind/Northwind.svc</Property>
         <Property Name="ODataServiceAuthenticationMode" Type="System.String">PassThrough</Property>
         <Property Name="ODataFormat" Type="System.String">application/atom+xml</Property>
      </Properties>
   </LobSystemInstances>
</LobSystem>
Odata Operator Examples
Odata Operator HTTP Verb URI
Finder GET http://server/crm.svc/Clients
SpecificFinder GET http://server/crm.svc/Clients('ClientName')
Creator POST http://server/crm.svc/Clients
Updater PUT http://server/crm.svc/Clients('ClientName')
Deleter DELETE http://server/crm.svc/Clients('ClientName')
AssociationNavigator GET http://server/crm.svc/Clients('ClientName')/Contacts

ETC's in SharePoint Hosted Apps

[Bearbeiten | Quelltext bearbeiten]
External List Instance for App Scoped ECT
<ListInstance ID="AppScopedList" Title="My App Scoped List" Description="My App Scoped List" Url="$Resources:core,lists_Folder;/AappScopedList" OnQuickLaunch="TRUE">
   <DataSource>
      <Property Name="LobSystemInstance" Value="" />
      <Property Name="EntityNamespace" Value="" />
      <Property Name="Entity" Value="" />
      <Property Name="SpecificationFinder" Value="" />
      <Property Name="MetadataCatalogFileName" Value="BDCMetadata.bdcm" />
   </DataSource>
</ListInstance>
Creating External Content type
→ Add
→ Content Types for External Data Source
→ copy link to .svc OData Webservice
→ select Entity
→ VS creates an .ect file
→ access datasource via App.js
Connecting to BCS with JavaScript
CSOM (Client Object Model) API REST API
var context = new SP.ClientContext();
var web = context.get_web();
entity = web.getAppBdcCatalog().getEntity(entityNameSpace, entityName);
context.load(entity);

logSystem = entity.getLobSystem();
context.load(lobSystem);

lobSystemInstances = lobSystem.getLobSystemInstances();
context.load(lobSystemInstances);

context.executeQueryAsync(onSuccess, onFailure);
AppLevelECT.Grid.prototype = {
  var init = function() {
    var query = siteUrl + "_api/lists/getbytitle('Person')/items?$select=FirstName,LastName";
    $.ajax({
      url: query, 
      headers: {
        "ACCEPT": "application/json", 
        "X-RequestDigest": $("#_REQUESTDIGEST").val(), 
        "success": this.showItems
      }
    }):
  };

  var showItems = function(data){
    var resultString = "";
    $.each(dta.d.results, function(key, val){
      resultString += val.FirstName + " " + val.LastName + "\n";
    })
    window.alert(resultString);
  };

  return {
    init: init, 
    showItems: showItems
  };
};

Notifications & Custom Event Receivers

[Bearbeiten | Quelltext bearbeiten]
  • events for external lists not supported in SP2010
  • must implement Subscribe, Unsubscribe
DeliveryAddress is
  • Relative URL for external list event handlers
  • Absolute URL for Entity event handlers
  • EventType can be
  • ItemAdded
  • ItemUpdated
  • ItemDeleted

OOB - out of the box LOB - line of business