ENTERPRISE

Sharepoint 2010 : Business Connectivity Services Deployment Types (part 1) - Code-Based Solutions

12/6/2011 11:42:33 AM
Understanding how and where a BCS solution can be deployed is fundamental when planning how to leverage this new functionality in SP 2010. With the new tool support and wide range of client program support, BCS is a strong candidate to consider when analyzing opportunities to meet business requirements. This section gives an overview of where BCS can be deployed and the general complex levels of deployment.

1. Functionality for Normal Users "Out-of-the-Box"

SharePoint 2010 now has out-of-the-box support for users to display external data using BCS in a seamless way. Similarly BCS integrates MS Word 2010, MS Outlook 2010, and SharePoint Workspace with SharePoint 2010 to allow users to use it in a well-known manner. Especially the support for Outlook 2010 was a much sought-after functionality in SharePoint 2007. Little or no administrator intervention is required for users to leverage list data in these applications. In most cases, the permissions setup is the most important step to be conscious about when preparing the SharePoint lists, etc. for use by these applications.

Using the external list, Business Data Web Parts, or the new Chart Web Part in SP 2010, it is easy for users to display external data. It is also possible to extend existing standard lists or document libraries by adding an external data column.

External columns can also be used in MS Word 2010 by creating a Quick Part for content control. This is useful, for instance, when a document template is to reflect the latest available data from the SharePoint-based intranet.

MS Outlook 2010 and SharePoint Workspace provide special integration with SharePoint. External lists can be taken offline from the SharePoint server. This way, users can interact with the data in the external list without leaving the client program. The major benefit is that the integration becomes transparent to the user, since the look and behavior are the same as in Outlook and Workspace. The required add-in for Outlook is installed as part of Microsoft Office 2010.

One thing to be aware of is that offline lists in MS Outlook 2010 and SharePoint Workspace require synchronization. This can be done either automatically or on user request. If automatic synchronization is activated, the default interval is three hours. As the structure of the offline list can change or new views can be added or modified, it is even possible to update the structure or view automatically without any user intervention.

The external content types and external lists/columns for these types of solutions are usually created by an administrator using SPD 2010. The SharePoint ribbon has buttons to make a connection between Outlook 2010 or SP Workspace 2010 and the external list/column.

2. Functionality for Advanced Users and Administrators

Some uses of BCS require the administrator or IT professional to perform certain tasks, such as publishing, to make it available to users. It also allows the IT professional to use custom code-based solutions as reusable components. This is particularly beneficial for the way many companies operate, as a consultant company can make components that the internal IT professionals can use and configure to meet changing demands, without having to go back to the vendor or consultant that provided the custom code-based solution for every tiny change to how the component is used. It makes the BCS installation easier, faster, and cheaper to maintain.

InfoPath forms presenting external data can be customized in terms of look and feel. This can be done by adding declarative rules and business logic. It is also possible to add code-behind to the forms. The form is published to the server by the administrator.

SharePoint workflows can be extended with new capabilities through SPD 2010 by adding read and write capabilities to external lists or using custom workflow activities from VS 2010. These must be published in SharePoint.

Site administrators can create Web Part pages based on multiple Business Data Web Parts and Chart Web Parts. By creating connections between the Web Parts, it is possible to create highly customized and information-rich pages with data from most common data sources.

When working with external lists in Outlook 2010, it is possible for users of the Outlook client to create new customized views to show this external data. The custom view can then be saved back to SharePoint. This makes it available as a public view for other Outlook users who use the same external list in Outlook.

Microsoft has a number of applications for creating these solutions. The most common tools are the InfoPath Designer, which is used to create forms, and the SharePoint Designer, which is used to create Web Part pages and workflows. Web Part pages can also be created through the browser. Finally MS Outlook 2010 can be used for creating customized views specifically for Outlook.

3. Code-Based Solutions

Code-based solutions are solutions created in Visual Studio 2010 by a developer. These solutions enable the creation of reusable components as either a .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. Code-based solutions are now made easy for developers with built-in support in Visual Studio 2010. In SharePoint 2007, it required advanced coding skills to do anything more complex than data reading. Now the developer can focus on issues such as reusability instead.

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 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 and BCS runtime is installed with SharePoint 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 it is already available, for instance, from an offline external list in SharePoint Workspace or Outlook. This type of solution can also be used to extend BCS to MS Office applications that are not integrated with BCS. Typically this will be Excel but also PowerPoint.

Alternatively an entire end-to-end solution that leverages the public Business Connectivity Services object model can be created. The deployment process is, however, more difficult, and there is no tool support for this custom connector solution.

In a code-based end-to-end solution, commonly referred to as a custom connector, 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 integrated and declarative solutions to integrate data.

NOTE

For most purposes, a .NET Assembly Connector is sufficient to meet business needs, and it is by far the easiest way to go.

By using "click once" packages, it is possible to create and deploy new task panes or present external data in external data parts in MS Outlook 2010. This requires a number of XML files to be created and use of the BCS Software Developer Kit to create the package.

A BCS project type is available to facilitate the creation of .NET Assembly Connectors.

When working with BCS, creating the external content types is the key task to perform by IT professionals. With the new support for creating ECTs in SPD 2010, it is surprisingly easy to do. This is definitely one of the most powerful new additions to SharePoint 2010. It is also possible to create an ECT from the SharePoint site, but SPD 2010 is the better choice when available.

To give an example of creating an ECT, assume a database with customer information (Figure 1) that is to be made accessible through an external SharePoint list. The Contact office type is chosen to make it integrate nicely into Outlook as an offline external list.

Figure 1. Sample customer data

In SPD 2010, connect to a site and open External Content Types from the Navigation menu, as in Figure 2. On this page, all current ECTs for the site are displayed. The ribbon has quick access buttons for the typical tasks to be performed.

Figure 2. External Content Types window

The first step is to create a new external content type:

  1. Click the New External Content Type button. The External Content Type dialog (Figure 3) will be displayed.

  2. Enter a Name and Display Name for the external content type. As this example contains contact info, select Contact as Office Item Type in the External Content Type Information section.

  3. Click the link named "Click here to discover external data sources and define operations." This opens the Operation Designer dialog.

    Figure 3. Create External Content Type window

On the Operation Designer dialog, click Add a Connection to connect to the database. In this example, it is called CustomersDatabase. This will establish a connection, and the database tables will be displayed. In this example, it has only one table, named CustomersTable.

To specify the types of operations that can be performed, right-click CustomersTable and select the option Create All Operations, as in Figure 4. This will enable all CRUD operations on the database table and open the operations wizard.

Figure 4. Operation Designer

Use the operations wizard (Figure 5) to map columns to the respective office properties. To do this, select the appropriate data source elements such as company name, phone number, etc. in the Properties window and specify the corresponding office property. Optionally a display friendly name can be specified. This name is what is showed later on the profile page for the ECT. Finally choose the column containing the values to be used as unique identifiers.

Figure 5. Operations wizard

Close the wizard when done, which returns to the Operation Designer window, shown in Figure 6.

NOTE

The wizard gives real-time information on suggested and missing tasks in the Errors and Warnings window. The errors must be resolved before the wizard is completed.

Figure 6. Operation Designer

After completing the wizard, save the ECT by clicking File and Save on the ribbon. The new external data type is saved to the metadata store and can be used for creating new external lists in SharePoint 2010.

Navigate to Site Actions, and view all site content. Select External List, and then click Create. This opens the New External List page, shown in Figure 7. Enter the name of the new list, select the External Content Type, and finally click Create.

Figure 7. Creating an external list

Before users can access the list, the proper permissions must be configured. Go to the service application for the Business Data Connectivity service. Select the newly created external content type and click Set Metadata Store Permissions, as shown in Figure 8.

Figure 8. Business Data Connectivity service main page

On the Set Metadata Store Permissions page (Figure 9), enter the appropriate user permissions, and click OK. Typically at least one administrative user should have all permissions. As administration here is time-consuming in the case of many users, consider using groups instead for easier maintenance.

Figure 9. Setting metadata store permissions

NOTE

If the ECT is to be used in search, make sure to grant the content access account appropriate permissions. In this example, the content access account is set as the author's account.

The new external list looks and behaves as any other ordinary list (Figure 10), with the exception of not supporting version history or setting up alerts. Items can be displayed, added, changed, and deleted—for example, changing the PhoneNumber in the list updates the value in the CustomersDatabase database.

Figure 10. The external list displaying external data

A key feature of BCS is the option to index the external data and present it nicely as search results. There are some required configuration steps for this to be available. The following sections focus on making the Customers ECT, created in the previous section, searchable.

Other  
  •  Sharepoint 2010 : BCS Architecture - Presentation & Core Components
  •  Collaborating via Web-Based Communication Tools : Evaluating Instant Messaging Services
  •  Collaborating via Web-Based Communication Tools : Evaluating Web Mail Services
  •  Developing the SAP Data Center : Data Center Physical Requirements
  •  Developing the SAP Data Center : Introducing the SAP Data Center
  •  Inventory of Broadband Phone Services
  •  Parallel Programming : Task Relationships (part 2) - Parent and Child Tasks
  •  Parallel Programming : Task Relationships (part 1) - Continuation Tasks
  •  BizTalk 2006 : Handling Ordered Delivery
  •  BizTalk 2006 : Implementing Dynamic Parallel Orchestrations
  •  Windows System Programming : The Registry
  •  Windows System Programming : File Locking
  •  SharePoint 2010 : Security - Secure Store Service & Using SSS with BCS
  •  SharePoint 2010 : Security - Claims Based Authentication
  •  SharePoint 2010 : PerformancePoint Services (part 2) - Using PerformancePoint
  •  SharePoint 2010 : PerformancePoint Services (part 1) - PerformancePoint Central Administration Settings
  •  Windows System Programming : Example: Listing File Attributes & Setting File Times
  •  Windows System Programming : File Attributes and Directory Processing
  •  Windows System Programming : File Pointers & Getting the File Size
  •  SharePoint 2010 : Business Intelligence - Excel Services (part 2) - Accessing Excel Services Over SOAP
  •  
    Top 10
    6 Packs Inkjet Papers For Home Printing
    Roccat Lua Tri-Button Gaming Mouse - Great Choice For Lefties
    Restore Your Files
    Change In Technology Services In 2013
    Easy Adoption of Enterprise Mobility
    Three Recent Arrivals Are Welcome Additions To The Market (Part 3)
    Three Recent Arrivals Are Welcome Additions To The Market (Part 2)
    Three Recent Arrivals Are Welcome Additions To The Market (Part 1)
    AR.Drone 2.0. Parrot New Wi-Fi Quadricopter
    Improve Your TV Sound
    Most View
    Top 5 Compact Cameras With Large Sensor : Leica X2, Canon G1X, Fujifilm X10, Sony RX100, Fujifilm X-S1
    Android Security : Activities
    Adobe Illustrator CS5 : Setting General Print Options, Setting Marks and Bleed Options
    How Well Do You Really Know iOS 6
    A Joyful Little : BenQ Joybee GP2
    iPhone Application Development : Getting the User’s Attention - Using Alert Sounds and Vibrations
    HTC One SV Review – Not Just A Pretty Face (Part 3)
    Hot 5 Products To Make Your Life Interesting
    Canon IXUS 500 HS - Small-But-Mighty Premium Compact
    Reference 3A Episode Loudspeaker
    Improvements in Windows Server 2008 R2 for Better Branch Office Support
    HP OMNI 27 - The One for Everything You Need
    SQL Server System and Database Administration : System Tables & System Stored Procedures
    Let’s Go Shopping: Inside The Win 8 Store
    Excel Programmer : Record and Read Code
    DirectX 10 Game Programming : The 2D Resurgence - How to Animate on Time
    Corsair AX 1200I - The First Digitally-Controlled PSU
    4K Video Coming To A Home Theater Near You
    Exchange Server 2010 : Perform Essential Database Management (part 1) - Manage the Database Files
    Iphone SDK : Working with the Address Book Database - Person Photo Retriever Application