Share via


Accessing Data with the Silverlight Client Object Model

The SharePoint Silverlight Client Object Model (Client OM) allows developers to interact with SharePoint from their Silverlight application easily - without having to write and deploy server-side code and without having to depend on the SharePoint web services and their inherent limitations and complexity. This demo will show basic interaction between a Silverlight application and SharePoint list data - specifically focusing on creating, reading, updating and deleting SPListItems directly from Silverlight and without requiring any server-side code.

Hands-On Labs

  • Accessing SharePoint Data with the Silverlight Client Object Model

    The SharePoint Silverlight Client Object Model (Client OM) allows developers to interact with SharePoint from their Silverlight application easily - without having to write and deploy server-side code and without having to depend on the SharePoint web services and their inherent limitations and complexity. This demo will show basic interaction between a Silverlight application and SharePoint list data - specifically focusing on creating, reading, updating and deleting SPListItems directly from Silverlight and without requiring any server-side code.

  • Connecting Silverlight controls to SharePoint data

    Silverlight 4 contains a wealth of rich user interface controls that can quickly be added to an application to deliver a rich and robust presentation layer for users of the application. This lab will introduce additional functionality by showing how to bind SharePoint data directly to many of those same Silverlight controls, requiring a minimal amount of custom code.

  • Displaying Large Datasets in Silverlight

    Lab 2 of this module demonstrated basic databinding by showing how to wire a collection directly to a Silverlight control. That works great for smaller collections of data, but what about large collection - numbering in the thousands. What is the best way to handle those scenarios? This lab walks through one possibility - breaking the dataset down into smaller chunks and moving through the data one page at a time.

  • Dynamic XAP Loading

    While the overhead of downloading the Silverlight client object model for one Silverlight application may not be very large (approximately 135 KB), when a page or a site makes use of multiple Silverlight applications, and each one includes the client assemblies within the XAP file, it adds up. A better approach is to not include the client object model assemblies inside each application's XAP, but instead to load them dynamically and cache them on the client. Microsoft has packaged up the two Silverlight client object model assemblies into a single XAP file named Microsoft.SharePoint.Client.xap and included it as part of the SharePoint installation. This lab will show how you can programmatically download the assemblies from their location on the server (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ClientBin) and have them be cached on the client, thereby improving load time for all Silverlight applications that utilize this approach.