Your SlideShare is downloading. ×
0
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Developing With Data Technologies
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Developing With Data Technologies

2,887

Published on

SharePoint 2010 opens up a wide range of options for developers, and this session will take you through the new SharePoint list Data Model Capabilities; LINQ to SharePoint; Client Object Model and …

SharePoint 2010 opens up a wide range of options for developers, and this session will take you through the new SharePoint list Data Model Capabilities; LINQ to SharePoint; Client Object Model and RESTful Data Service Interface for SharePoint.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,887
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Here is an overall view of the SharePoint data technologies platform. Developers can make use of these technologies to build SharePoint applications. SharePoint 2010 introduces more additions to the already available SharePoint 2007 technologies.Explain the client side and server side framework:Client OMREST APIsSPLINQ
  • Microsoft SharePoint Foundation offers a highly structured server-side object model that makes it easy to access objects that represent the various aspects of a SharePoint Web site. From higher-level objects, you can drill down through the object hierarchy to obtain the object that contains the members you need to use in your code.
  • Sample custom application: You may want to create custom .aspx pages and Web applications and store them in a location that is accessible from all Web sites in your Microsoft SharePoint Foundation 2010 deploymentDeveloper writes code (.aspx.cs) using the Server OMServer OM interacts with the SharePoint site, retrieves the data from the SharePoint siteThe .aspx page displays the SharePoint data
  • Transcript

    • 1. Developing With Data Technologies
      Chakkaradeep Chandran
      http://www.chakkaradeep.com
      @chakkaradeep
    • 2. Session Objectives and Takeaway
      Session Objectives:
      Explain SharePoint Data Technologies
      Present the new List Platform Capabilities
      Demonstrate how to interact with SharePoint data using:
      LINQ to SharePoint
      Client Object Model
      .NET CLR
      Silverlight CLR
      JavaScript CLR
      RESTful Data Service Interface
      Takeaway:
      Building applications using the various SharePoint 2020 Data Technologies
    • 3. SharePoint 2010 for Developers
      Visual Studio 2010
      Install on Windows 7
      SharePoint Designer 2010
      Developer Dashboard
      Developer Productivity
      Business Connectivity Services
      LINQ, REST and Data Improvements
      Client Object Model
      Silverlight Web Part
      ECMAScript Object Model (JavaScript,JSCript)
      Rich Platform Services
      Team Foundation Server
      Sandboxed Solutions
      WSP Solution Upgrade
      SharePoint Online
      Flexible Deployment
    • 4. Overview of Data Technologies
      REST APIs
      Client OM
      Client Side
      Data Platform
      Server Side
      Farm
      Site
      List Data
      External Lists
      LINQ
      (spmetal.exe)
      ServerOM
    • 5. List Data Improvements in SharePoint 2010
    • 6. Lists and Lookups
      Lookup
      Lookup
      Projects
      Employees
      Clients
      m
      1
      m
      1
      Lookups form relationships between lists
      One-to-many
      Many-to-many
    • 7. 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
    • 8. List Validation
      Validation Formula can be specified on List and Columns
      =[Column1]-[Column2]
      =AND([Column1]>[Column2], [Column1]<[Column3])
      =PRODUCT([Column1],[Column2],2)
      =DATEDIF([Column1], [Column2],"d")
      =CONCATENATE([Column2], ",", [Column1])
    • 9. Large Lists
      Set a limit for how many rows of data can be retrieved for a list or library at any one time:
      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
    • 10. List View Threshold
    • 11. List Data Model
      Lookup to Multiple Columns
      List Relationships
      Related Items UI
      List Validation
    • 12. Summary : List Data Improvements
      REST APIs
      Client OM
      Client Side
      Data Platform
      Server Side
      Farm
      Site
      List Data
      External Lists
      LINQ
      (spmetal.exe)
      ServerOM
    • 13. Server Object
      Model
    • 14. Building Server Applications
      .aspx.cs
      Server OM
      SharePoint data
      SharePoint data
      Classes & Objects
      SharePoint Site
    • 15. Server Object Model Example Code
      Using Microsoft.SharePoint;
      List<Announcement> announcements = new List<Announcement>();
      SPSitesite = SPContext.GetContext(HttpContext.Current).Site;
      using (SPWebcurWeb = site.OpenWeb())
      {
      SPListlstAnnouncements =
      curWeb.Lists[new Guid(LibraryName)];  
      //rest of the code
      }
    • 16. LINQ to SharePoint
      (SPLinq)
    • 17. LINQ to SharePoint
      Entity based programming
      Strong Types and Intellisense
      Translates LINQ queries to CAML queries
      Supports List Joins and Projections
      Join lists on lookup field between them
      Join multiple lists (A->B->C)
      Project any field from joined list in a query without changes in list schema
      Can be used in
      Web Parts
      Event Receivers
      Sandboxed Code
    • 18. LINQ to SharePoint Basics
      spmetal.exe
      SPLinq.cs
      SPLinq.vb
      spmetal/web:http://dataetch/code:SPLinq.cs
      SharePoint Site
      http://datatech
      SPLinqDataContext
      SPLinqDataContext dc = new SPLinqDataContext (“http://datatech”);
      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;
    • 19. SPMetal Options
    • 20. LINQ to SharePoint
    • 21. SPMetal – Default Code Generation Rules
      spmetal.exe
      SPLinqDataContext
      Project
      Projects
      Class
      Property
      GetProjects
    • 22. SPMetal Parameters XML File
      SPMetal does not require a parameters XML file
      To include or exclude a different set of lists and columns from the default
      <?xmlversion="1.0" encoding="utf-8"?>
      <WebAccessModifier="Internal" xmlns="http://schemas.microsoft.com/SharePoint/2009/spmetal">
      <ContentTypeName="Contact" Class="Contact">
      <ColumnName="ContId" Member="ContactId" />
      <ColumnName="ContactName" Member="ContactName1" />
      <ColumnName="Category" Member="Cat" Type="String"/>
      <ExcludeColumnName="HomeTelephone" />
      </ContentType>
      <ExcludeContentTypeName="Order"/>
      <ListName=”Team Members” Type=”TeamMember”>
      <ContentTypeName=”Item” Class=”TeamMember” />
      </List>
      </Web>
    • 23. LINQ to SharePoint: Parameters XML File
    • 24. Summary : LINQ to SharePoint
      REST APIs
      Client OM
      Client Side
      Data Platform
      Server Side
      Farm
      Site
      List Data
      External Lists
      LINQ
      (spmetal.exe)
      ServerOM
    • 25. Client ObjectModel
    • 26. Building Client Applications – MOSS 2007
      {code}
      Web Services
      {SharePoint data}
      SharePoint Site
      SharePoint API
      {SharePoint data}
    • 27. Client Object Model – SharePoint 2010
      {code}
      {SharePoint data}
      Client Object Model
      {SharePoint data}
      SharePoint Site
    • 28. Client Object Model Example Code
      class ClientOM
      {
      using Microsoft.SharePoint.Client;
      static void Main()
      {
      ClientContextclientContext=
      new ClientContext("http://datatech");
      Web oWebsite = clientContext.Web;
      clientContext.Load(oWebsite);
      clientContext.ExecuteQuery();
      Console.WriteLine(oWebsite.Title);
      }
      }
    • 29. Client OM
    • 30. Client Object Model – How It Works
      WCF Service
      (Client.svc)
      JavaScript Application
      Server OM
      JSON Response
      JavaScript OM
      SharePoint Site
      XML Request
      Proxy
      XML Request
      Proxy
      JSON Response
      Managed OM
      Managed Code Application (.NET)
    • 31. Client Object Model – How It Works
      Client Application
      Server
      Sequence of commands:
      command 1;
      command 2;
      command 3;
      context.ExecuteQuery();
      client.svc
      Execute commands
      in the batch:
      command 1;
      command 2;
      command 3;
      Send results back
      XML
      JSON
      Process results
    • 32. ClientContextclientContext= new ClientContext("http://sptechcon");
      List list= clientContext.Web.Lists.GetByTitle(“Workshops");
      CamlQuerycamlQuery = new CamlQuery();
      camlQuery.ViewXml= "<View/>";
      ListItemCollectionlistItems= list.GetItems(camlQuery);
      clientContext.Load(list);
      clientContext.Load(listItems);
      clientContext.ExecuteQuery();
      foreach(ListItemlistItem in listItems)
         Console.WriteLine("Id: {0} Title: {1}", listItem.Id,listItem["Title"]);
      Client Object Model – Object Identity
    • 33. Client Object Model – The Pattern
      Create a Client Connection
      Create the Query
      Execute the Query
      ClientContextclientContext = new ClientContext("http://datatech");
      clientContext.ExecuteQuery();
      List list = clientContext.Web.Lists.GetByTitle(“Projects");
      clientContext.Load(list);
    • 34. Client Object Model – Trimming the Results
      Title
      Property
      Web
      SharePoint Site
      Lists
      Collection
      Title
      Property
      Id
      Property
    • 35. .NET CLR Client Object Model
      Requires two assemblies:
      Microsoft.SharePoint.Client
      Microsoft.SharePoint.Client.Runtime
      Develop solutions remotely
    • 36. .NET Client OM
      Using CAML Query
      Object Identity
      Trimming The Results
      Creating and Populating a List
      Updating Client Objects
      Deleting Client Objects
      Asynchronous Pattern
    • 37. Silverlight CLR Client Object Model
      Requires two assemblies:
      Microsoft.SharePoint.Client.Silverlight
      Microsoft.SharePoint.Client.Silverlight.Runtime
      Develop solutions remotely
    • 38. Silverlight Client OM
    • 39. JavaScript Client Object Model
      Minified .js files for the ECMAScript (JavaScript, JScript) object model:
      SP.js
      SP.Core.js
      SP.Ribbon.js
      SP.Runtime.js
      Browser Support for ECMA Script:
      Microsoft Internet Explorer 7 and greater
      Firefox 3.5 and greater
      Safari 4.0 and greater
      Develop solutions remotely
    • 40. JavaScript Client OM
    • 41. Summary : Client Object Model
      REST APIs
      Client OM
      Client Side
      Data Platform
      Server Side
      Farm
      Site
      List Data
      External Lists
      LINQ
      (spmetal.exe)
      ServerOM
    • 42. RESTful Data ServiceInterface
    • 43. RESTful Data Service Interface
      REST-style list data web service
      http://<site>/_vti_bin/ListData.svc
      Work with data via REST
      SharePoint List Data
      Powered by ADO.NET Data Services
      ADO.NET Data Services v1.5 CTP2
      Entity based programming
      Strong Types
      LINQ Queries
      Integration with Visual Studio
    • 44. REST API QueryString Parameters
      $filter={simple predicate}
      $expand={Entity}
      $orderby={property}
      $skip=n
      $top=n
      $metadata
      Full List - http://bit.ly/RESTfulAPI
    • 45. Makes Development Easy!
    • 46. Accessing List Data via REST APIs
    • 47. Summary
      REST APIs
      Client OM
      Client Side
      Data Platform
      Server Side
      Farm
      Site
      List Data
      External Lists
      LINQ
      (spmetal.exe)
      ServerOM
    • 48. Thank You
      chaks@intergen.co.nz
      http://www.chakkaradeep.com/category/SharePoint-2010.aspx
      http://twitter.com/chakkaradeep

    ×