Sharepoint 2010 data provider
1 / 36

SharePoint 2010 : Data Provider - PowerPoint PPT Presentation

  • Updated On :

SharePoint 2010 : Data Provider. The New way to connect data in SharePoint 2010. Renaud Comte [MVP] Wygwam Paris Wygwam Nord. Wygwam Belux. Wygwam Suisse. Session Objectives: . Overview of Data Technologies

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'SharePoint 2010 : Data Provider' - wallis

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Sharepoint 2010 data provider l.jpg
SharePoint 2010 : Data Provider

The New way to connect data in SharePoint 2010

Renaud Comte [MVP]

Slide2 l.jpg

Wygwam Paris

Wygwam Nord

Wygwam Belux

Wygwam Suisse

Session objectives l.jpg
Session Objectives:

  • Overview of Data Technologies

  • Discover each SharePoint data access technology

  • Present the new List Platform capabilities

  • Demonstrate how to interact with SharePoint data using the new SharePoint APIs

Overview of data technologies l.jpg
Overview of Data Technologies






Data Platform



List Data

External Lists






New in 2010


Lists and lookups l.jpg

Lookups form relationships between lists



Lists and Lookups










List relationships l.jpg
List Relationships

  • Enforce Data Integrity

  • One-to-many relationships can be used to:

    • Trigger cascade delete

    • Restrict delete

  • Relationship behaviors (delete/restrict) are not supported on multi-value lookups

Large lists l.jpg
Large Lists

  • Set a limitfor how many rows of data can be retrieved for query before execution

    • List View Threshold

    • List View Threshold for Auditors and Administrators

    • List View Lookup Threshold

    • Daily Time Window for Large Queries

  • If enabled on the Web Application, developer can turn off throttling using:

    • SPQuery.RequestThrottleOverride

    • SPSiteDataQuery.RequestThrottleOverride

  • Slide9 l.jpg

    List Data Model by Code

    Lookup to Multiple Columns

    List Relationships

    Related Items UI

    Caml queries 2010 main changes l.jpg

    Data engine query still use CAML

    Just for query !

    Become relationnal

    CAML Queries 2010 - Main Changes

    Slide12 l.jpg

    CAML 2010 in fact

    Lookup to Multiple Columns

    List Relationships

    Related Items UI

    Linq for sharepoint l.jpg
    Linq for SharePoint

    aka SPLINQ

    Linq for sharepoint aka splinq l.jpg

    Entity based programming on the server

    SPMetal Code Generation Utility

    LINQ Queries

    Strong Types

    Translates LINQ queries into CAMLqueries

    Can be used in

    Web Parts, Event Receivers, Sandboxed code(Server OM only)

    Linq for SharePoint aka SPLINQ

    Linq to sharepoint basics l.jpg
    LINQ to SharePoint Basics





    SharePoint Site



    • SPLinqDataContext dc = new SPLinqDataContext (“http://SPsomewhere”);

    • var q=dc.Employees.Where(emp=>emp.DueDate < DateTime.Now.AddMonths(6));

      • from o in data.Orderswhere o.Customer.City.Name == “San Francisco“select o;

    Linq for sharepoint aka splinq16 l.jpg

    Some details :

    Supports List Joins and Projections

    LINQ (lambda expressions, anonymous types, joins ...) can be used accross SharePoint lists

    Manage also Create/Update/Read/Delete operation

    Only "efficient" queries are supported by SPLINQ Beta 2.

    must be completed via LINQ to objects

    Change conflicts handling


    Linq for SharePoint aka SPLINQ

    Slide17 l.jpg

    SPLINQ live

    Simple Query

    Join Query

    Data CRUD and relational

    Sync management

    Linq to sharepoint sample original linq query l.jpg

    from p indata.Projectswhere

    p.Client.City == "Chicago"select new


    Name = p.Title,

    ClientName = p.Client.Title,

    Budget = p.BudgetHours


    LINQ to SharePointSample: Original LINQ query

    Linq to sharepoint g e nerated caml query l.jpg





    <FieldRefName="ContentTypeId" />




    <FieldRefName="ClientCity" />







    <FieldRefName="Title" />

    <FieldRefName="ClientTitle" />

    <FieldRefName="BudgetHours" />



    <FieldName="ClientTitle" Type="Lookup"

    List="Client" ShowField="Title" />

    <FieldName="ClientCity" Type="Lookup"

    List="Client" ShowField="City" />



    <JoinType="LEFT" ListAlias="Client">

    <!--List Name: Clients-->


    <FieldRefName="Client" RefType="ID" />

    <FieldRefList="Client" Name="ID" />




    LINQ to SharePointGenerated CAML Query

    Client object model l.jpg
    Client Object Model

    JS/SL/Win OM

    Client object model21 l.jpg

    Unified object model across all clients


    Subset of Server OM

    Webs, Lists, ListItems,Content Types, Fields,etc.

    Client Object Model

    Client om generally how it works l.jpg
    Client OMGenerally How It Works

    Client Application


    Sequence of commands:


    command 1;

    command 2;

    command 3;

    Execute commands

    in the batch:


    command 1;

    command 2;

    command 3;



    Process results

    Send results back

    • Proxy to WCF

      • XML query / JSON response

    Client object model pattern l.jpg
    Client Object Model : Pattern

    • Create a Client Connection

    • Create a Client Connection

    • Execute the Query

    ClientContextclientContext = new ClientContext("http://SPdata");

    List list = clientContext.Web.Lists.GetByTitle(“Projects");



    Client object model remarks l.jpg

    Not an another OM !!!

    Simple API

    Server OM like !

    It gives you

    Effienciency,Batch processing,Productivity,...

    Still need

    Context to load / Batch to execute

    CAML to query data ...

    Client Object Model : remarks

    Restful data service interface l.jpg
    RESTful Data ServiceInterface

    Odata is coming

    Rest api l.jpg

    Work with data via Representational State Transfer (REST)

    Rss/Atom like : http://<site>/_vti_bin/ListData.svc

    SharePoint List Data

    Other Datasources

    Excel Services, Azure Cloud, ...

    Powered byWCF Data Services (ADO.NET Data Services v1.5 CTP2)

    Entity based programming

    Strong Types

    LINQ Queries


    Slide27 l.jpg

    Framework free

    The Open Data Protocol (OData) is a Web protocol for querying and updating data that provides a way to unlock your data and free it from silos that exist in applications today

    Easy to use, not too much technology dependency

    Good for client side developpement

    Just a new protocol (Atom like)

    Open to any another technology

    Data/Url Driven

    Full Integration with Visual Studio

    Rest apis querystring parameters l.jpg
    REST APIsQueryString Parameters

    • $filter={simple predicate}

    • $expand={Entity}

    • $orderby={property}

    • $skip=n

    • $top=n

    • $metadata

    • See:

    Rest apis uri map entity properties l.jpg
    REST APIsURI Map - Entity Properties

    • Syntax:

    • /_vti_bin/ListData.svc/{Entity}[({identifier})]/[{Property}]

    • Example to get budget hours for Project #4:

    • /_vit_bin/ListData.svc/Projects(4)/BudgetHours

    Rest apis uri map filter l.jpg
    REST APIsURI Map Filter

    • Syntax:

    • /_vti_bin/ListData.svc/{Entity}?$filter={simple predicate}

    • Example to get Projects for Clients in Geneva:

    • /_vit_bin/ListData.svc/Projects?$filter=Client/City eq ‘Geneva'

    Rest apis uri map expand think join l.jpg
    REST APIsURI Map – Expand (think Join)

    • Syntax:

    • /_vti_bin/ListData.svc/{Entity}?$expand={Entity}

    • Example to get a Project and its related Client:

    • /_vit_bin/ListData.svc/Projects?$expand=Client

    Slide32 l.jpg

    REST now …

    From a real simple client side code : jquery to ...

    Data access technologies decision matrix l.jpg
    Data Access TechnologiesDecision Matrix

    To sum up l.jpg

    SharePoint 2010 List Data Model

    Relationships, Joins, and Data Integrity

    Caml is still here but Linq also

    Client OM and Server OM

    Complete set of data APIs on both server and client side

    REST APIs and LINQ to SharePoint

    Simple and integrated developer experience for list based Data Applications

    Of course : SP2010 Data coding

    To sum up

    Thank you for your attention l.jpg
    Thank you for your Attention!

    • For more Information please contact

    • Name : Renaud Comte

      • Title : SharePoint Team Leader

      • Email :