Microsoft and the BDC (Business data catalog)

Posts   
 
    
Ren
User
Posts: 42
Joined: 01-Jul-2005
# Posted on: 10-Mar-2006 01:27:11   

Has anyone else seen the new Business Data Catalog that Microsoft is rolling out? There are a couple of new technologies that are being targeted to abstract your custom objects from the underlying data. For SharePoint and web based interaction it's the BDC and the IBF for Office 12.

What you do is create an XML representation of your data with 2 basic Get methods, one for single item and one for collection. So for example you have a customer object with these 2 methods. This XML (with specifics for the BDC) is then loaded into SharePoint and there you go. You should now have the ability to access your business data through sharepoint just like a sharepoint list.

So, if you where wondering about the implementation of object relational mapping in Microsoft, it looks that this one of the ways they are doing it.

As of right now, there is no way of 'automatically' creating the XML that gets loaded into the BDC (Business Data Catalog). This is where 3rd party vendors can get a foothold. Hmm.

We are in the process of trying to create a Proof of concept based on this. Supposedly it is supposed to be easier (consultant speak). But as of today's beta technology it's a black hole.. disappointed

Has anyone else had any exposure to the BDC of IBF (information bridge framework)? What are the thoughts of the OR mapping crowd?

Posts: 7
Joined: 28-Jun-2007
# Posted on: 28-Jun-2007 12:03:03   

I've done this in MOSS 2007 and it works fine. The MOSS search service can be configurated to search also information from the BDC.

It is true that Microsoft does not provide a tool to create the Application Definition File (xml). However there is a commercial tool available at http://www.bdcmetaman.com/default.aspx.

The xml to use two tables (Landen and Projecten) of our database should be:


?<?xml version="1.0" standalone="yes"?>
<LobSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
           xsi:schemaLocation="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog BDCMetadata.XSD" 
  xmlns="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog" Type="Database" Version="1.0.0.0" Name="DigiOfficeNET">
  <Properties>
    <Property Name="WildcardCharacter" Type="System.String">%</Property>
  </Properties>

  <LobSystemInstances>
    <LobSystemInstance Name="DigiOfficeNET_Instance">
      <Properties>
        <Property Name="DatabaseAccessProvider" Type="System.String">SqlServer</Property>
        <Property Name="AuthenticationMode" Type="System.String">PassThrough</Property>
        <Property Name="RdbConnection Data Source" Type="System.String">dev-srv1</Property>
        <Property Name="RdbConnection Initial Catalog" Type="System.String">DigiOfficeNET</Property>
        <Property Name="RdbConnection Integrated Security" Type="System.String">SSPI</Property>
        <Property Name="RdbConnection Pooling" Type="System.String">False</Property>
        <Property Name="persist security info" Type="System.String">True</Property>
        <Property Name="User ID" Type="System.String">sa</Property>
        <Property Name="Password" Type="System.String">dude</Property>
      </Properties>
    </LobSystemInstance>
  </LobSystemInstances>
  <Entities>
    <Entity EstimatedInstanceCount="0" Name="dbo.Landen">
      <Properties>
        <Property Name="Title" Type="System.String">LandOmschr</Property>
      </Properties>
      <Identifiers>
        <Identifier Name="LandID" TypeName="System.Int32" />
      </Identifiers>
      <Methods>
        <Method Name="Getdbo.Landen">
          <Properties>
            <Property Name="RdbCommandText" Type="System.String">Select LandID,LandOmschr,LandCode,LandCodeAfk2,LandCodeAfk3,LandWijzigDatum,LandWijzigNaam, LandInvoerDatum,LandInvoerNaam,LandSyncDatum,LandSyncNaam,LandEU From dbo.Landen Where (LandID&gt;=@GeneratedMinLandID) and (LandID&lt;=@GeneratedMaxLandID)</Property>
            <Property Name="RdbCommandType" Type="System.Data.CommandType">Text</Property>
          </Properties>
          <FilterDescriptors>
            <FilterDescriptor Type="Comparison" Name="LandID" />
          </FilterDescriptors>
          <Parameters>
            <Parameter Direction="In" Name="@GeneratedMinLandID">
              <TypeDescriptor TypeName="System.Int32" IdentifierName="LandID" AssociatedFilter="LandID" Name="LandID">
                <DefaultValues>
                  <DefaultValue MethodInstanceName="dbo.LandenFinder" Type="System.Int32">0</DefaultValue>
                  <DefaultValue MethodInstanceName="dbo.LandenSpecificFinder" Type="System.Int32">0</DefaultValue>
                </DefaultValues>
              </TypeDescriptor>
            </Parameter>
            <Parameter Direction="In" Name="@GeneratedMaxLandID">
              <TypeDescriptor TypeName="System.Int32" IdentifierName="LandID" AssociatedFilter="LandID" Name="LandID">
                <DefaultValues>
                  <DefaultValue MethodInstanceName="dbo.LandenFinder" Type="System.Int32">9999999</DefaultValue>
                  <DefaultValue MethodInstanceName="dbo.LandenSpecificFinder" Type="System.Int32">9999999</DefaultValue>
                </DefaultValues>
              </TypeDescriptor>
            </Parameter>
            <Parameter Direction="Return" Name="dbo.Landen">
              <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="dbo.LandenDataReader" IsCollection="true">
                <TypeDescriptors>
                  <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="dbo.LandenDataRecord">
                    <TypeDescriptors>
                      <TypeDescriptor TypeName="System.Int32" IdentifierName="LandID" Name="LandID" />
                      <TypeDescriptor TypeName="System.String" Name="LandOmschr" />
                      <TypeDescriptor TypeName="System.Int32" Name="LandCode" />
                      <TypeDescriptor TypeName="System.String" Name="LandCodeAfk2" />
                      <TypeDescriptor TypeName="System.String" Name="LandCodeAfk3" />
                      <TypeDescriptor TypeName="System.DateTime" Name="LandWijzigDatum" />
                      <TypeDescriptor TypeName="System.String" Name="LandWijzigNaam" />
                      <TypeDescriptor TypeName="System.DateTime" Name="LandInvoerDatum" />
                      <TypeDescriptor TypeName="System.String" Name="LandInvoerNaam" />
                      <TypeDescriptor TypeName="System.DateTime" Name="LandSyncDatum" />
                      <TypeDescriptor TypeName="System.String" Name="LandSyncNaam" />
                      <TypeDescriptor TypeName="System.Boolean" Name="LandEU" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Name="dbo.LandenFinder" Type="Finder" ReturnParameterName="dbo.Landen" ReturnTypeDescriptorName="dbo.LandenDataReader" ReturnTypeDescriptorLevel="0" />
            <MethodInstance Name="dbo.LandenSpecificFinder" Type="SpecificFinder" ReturnParameterName="dbo.Landen" ReturnTypeDescriptorName="dbo.LandenDataReader" ReturnTypeDescriptorLevel="0" />
          </MethodInstances>
        </Method>
        <Method Name="dbo.LandenIDEnumerator">
          <Properties>
            <Property Name="RdbCommandType" Type="System.String">Text</Property>
            <Property Name="RdbCommandText" Type="System.String">Select LandID from dbo.Landen</Property>
          </Properties>
          <Parameters>
            <Parameter Direction="Return" Name="LandIDs">
              <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="dbo.Landen" IsCollection="true">
                <TypeDescriptors>
                  <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="dbo.Landen">
                    <TypeDescriptors>
                      <TypeDescriptor TypeName="System.Int32" IdentifierName="LandID" Name="LandID" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Name="LandIDEnumeratorInstance" Type="IdEnumerator" ReturnParameterName="LandIDs" />
          </MethodInstances>
        </Method>

      </Methods>
      <Actions>
        <Action Name="Bewerken" Position="1" IsOpenedInNewWindow="true" Url="http://localhost/DigiOffice/Detail.aspx?RecID={0}&amp;PageMenu=LandDetail&amp;Entity=Land" ImageUrl="http://localhost/DigiOffice/Shared/Images/Landen16.gif">
          <ActionParameters>
            <ActionParameter Name="LandID" Index="0" />
          </ActionParameters>
        </Action>
      </Actions>
    </Entity>
    <Entity EstimatedInstanceCount="0" Name="dbo.Projecten">
      <Properties>
        <Property Name="Title" Type="System.String">ProjNaam</Property>
      </Properties>
      <Identifiers>
        <Identifier Name="ProjID" TypeName="System.Int32" />
      </Identifiers>
      <Methods>
        <Method Name="Getdbo.Projecten">
          <Properties>
            <Property Name="RdbCommandText" Type="System.String">
              SELECT     ProjID, ProjNrFase1, ProjNaam, ProjOmschr1, ProjOmschr2, ProjAdres, ProjPlaats, ProjStartdatum, ProjOpleverdatum
              FROM       Projecten
              Where (ProjID&gt;=@GeneratedMinProjID) and (ProjID&lt;=@GeneratedMaxProjID)
              </Property>
            <Property Name="RdbCommandType" Type="System.Data.CommandType">Text</Property>
          </Properties>
          <FilterDescriptors>
            <FilterDescriptor Type="Comparison" Name="ProjID" />
          </FilterDescriptors>
          <Parameters>
            <Parameter Direction="In" Name="@GeneratedMinProjID">
              <TypeDescriptor TypeName="System.Int32" IdentifierName="ProjID" AssociatedFilter="ProjID" Name="ProjID">
                <DefaultValues>
                  <DefaultValue MethodInstanceName="dbo.ProjectenFinder" Type="System.Int32">0</DefaultValue>
                  <DefaultValue MethodInstanceName="dbo.ProjectenSpecificFinder" Type="System.Int32">0</DefaultValue>
                </DefaultValues>
              </TypeDescriptor>
            </Parameter>
            <Parameter Direction="In" Name="@GeneratedMaxProjID">
              <TypeDescriptor TypeName="System.Int32" IdentifierName="ProjID" AssociatedFilter="ProjID" Name="ProjID">
                <DefaultValues>
                  <DefaultValue MethodInstanceName="dbo.ProjectenFinder" Type="System.Int32">9999999</DefaultValue>
                  <DefaultValue MethodInstanceName="dbo.ProjectenSpecificFinder" Type="System.Int32">9999999</DefaultValue>
                </DefaultValues>
              </TypeDescriptor>
            </Parameter>
            <Parameter Direction="Return" Name="dbo.Projecten">
              <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="dbo.ProjectenDataReader" IsCollection="true">
                <TypeDescriptors>
                  <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="dbo.ProjectenDataRecord">
                    <TypeDescriptors>
                      <TypeDescriptor TypeName="System.Int32" IdentifierName="ProjID" Name="ProjID" />
                      <TypeDescriptor TypeName="System.String" Name="ProjNrFase1" />
                      <TypeDescriptor TypeName="System.String" Name="ProjNaam" />
                      <TypeDescriptor TypeName="System.String" Name="ProjOmschr1" />
                      <TypeDescriptor TypeName="System.String" Name="ProjOmschr2" />
                      <TypeDescriptor TypeName="System.String" Name="ProjAdres" />
                      <TypeDescriptor TypeName="System.String" Name="ProjPlaats" />
                      <TypeDescriptor TypeName="System.DateTime" Name="ProjStartDatum" />
                      <TypeDescriptor TypeName="System.DateTime" Name="ProjOpleverDatum" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Name="dbo.ProjectenFinder" Type="Finder" ReturnParameterName="dbo.Projecten" ReturnTypeDescriptorName="dbo.ProjectenDataReader" ReturnTypeDescriptorLevel="0" />
            <MethodInstance Name="dbo.ProjectenSpecificFinder" Type="SpecificFinder" ReturnParameterName="dbo.Projecten" ReturnTypeDescriptorName="dbo.ProjectenDataReader" ReturnTypeDescriptorLevel="0" />
          </MethodInstances>
        </Method>
        <Method Name="dbo.ProjectenIDEnumerator">
          <Properties>
            <Property Name="RdbCommandType" Type="System.String">Text</Property>
            <Property Name="RdbCommandText" Type="System.String">Select ProjID from dbo.Projecten</Property>
          </Properties>
          <Parameters>
            <Parameter Direction="Return" Name="ProjIDs">
              <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="dbo.Projecten" IsCollection="true">
                <TypeDescriptors>
                  <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="dbo.Projecten">
                    <TypeDescriptors>
                      <TypeDescriptor TypeName="System.Int32" IdentifierName="ProjID" Name="ProjID" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Name="ProjIDEnumeratorInstance" Type="IdEnumerator" ReturnParameterName="ProjIDs" />
          </MethodInstances>
        </Method>
      </Methods>
      <Actions>
        <Action Name="Bewerken" Position="1" IsOpenedInNewWindow="true" Url="http://localhost/DigiOffice/Detail.aspx?RecID={0}&amp;PageMenu=ProjectDetail&amp;Entity=Project" ImageUrl="http://localhost/DigiOffice/Shared/Images/Projecten16.gif">
          <ActionParameters>
            <ActionParameter Name="ProjID" Index="0" />
          </ActionParameters>
        </Action>
      </Actions>
    </Entity>   

  </Entities>
</LobSystem>

As you can see the xml describes the definition of our tables. I am wondering if the LLBLGen OR mapper could also generate this xml with the use of a specialized template?

The xml describes also an action method which links to the webapplication where the data can be mutated. This action method comes available at sevaral places in SharePoint.