SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
description
Transcript of SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
![Page 1: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/1.jpg)
[email protected](425) 522-3727
Professional Learning Programs for Microsoft SharePoint, Office 365 and Windows Azure
Understanding and ProgrammingSharePoint Web Services
![Page 2: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/2.jpg)
About Chris Beckett
24+10MCMMCT
MCSEMCPD
Solution ArchitectLearning Consultant
and Trainer
@sharepointbits
blog.sharepointbits.com
![Page 3: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/3.jpg)
Agenda
Introduction toSharePoint Web
Services
SOAPWeb Services
Client-SideObject Model REST API
![Page 4: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/4.jpg)
What is a Web Service?
A software system designed to support interoperable machine-to-machine interaction over a network
W3C
![Page 5: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/5.jpg)
A Web Services Story1 2 3
4 5 6
![Page 6: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/6.jpg)
Available SharePoint Web Services
• Open Standards
• RPC Model
• Protocol Agnostic
• XML
• Microsoft Proprietary
• Batch RPC Model
• Client Runtime
• XML / JSON
• Open Standards
• REST Model
• HTTP Only
• ATOM / JSON
SOAPWeb Services
Client Side ObjectModel (CSOM)
ODATAWeb Services
![Page 7: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/7.jpg)
SharePoint 2010 Web Service Access
SOAP CSOM ODATA
Lists and Libraries
Site and List Settings
Site Security
Workflow
Search
Managed Metadata
User Profiles
Publishing
![Page 8: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/8.jpg)
SharePoint 2010 Web Service Clients
SOAP CSOM ODATA
JavaScript
Silverlight
.NET
Windows Phone
Other Languages
InfoPath Receive
InfoPath Submit
BCS WCF Connector
![Page 9: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/9.jpg)
SharePoint 2013 Web Service Access
SOAP CSOM ODATA
Lists and Libraries
Site and List Settings
Site Security
Workflow
Search
Managed Metadata
User Profiles
Publishing
Deprecated
![Page 10: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/10.jpg)
SharePoint 2010 Web Service Clients
SOAP CSOM ODATA
JavaScript
Silverlight
.NET
Windows Phone
Other Languages
InfoPath Receive
InfoPath Submit
BCS WCF Connector
Deprecated
![Page 11: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/11.jpg)
Agenda
UnderstandingSharePoint Web
Services
Programming withSOAP-Based
Web ServicesProgramming with
the Client-SideObject Model
Programming withthe ODATA RESTful
Web Services
![Page 12: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/12.jpg)
What is SOAP?
Created by Microsoft in 1998 / W3C Standard
Protocol Agnostic / Common to use HTTP
RPC Message Pattern (Request/Response)
XML Schema used for Message Structures
![Page 13: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/13.jpg)
SOAP Request Message Format
SOAP Envelope
SOAP Body
Method and Parameters
![Page 14: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/14.jpg)
SOAP Response Message Format
SOAP Envelope
SOAP Body
Response Xml
![Page 15: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/15.jpg)
SOAP Considerations
• All Versions of SharePoint• Ubiquitous• Protocol Agnostic• Language Agnostic
• Access to Enterprise Services
• Designed to work with Proxy• Not JavaScript Friendly• Verbose Xml Data• No Anonymous
![Page 16: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/16.jpg)
SharePoint Web Service AddressesWeb Service Web Service AddressSearch http://<site>/_vti_bin/search.asmxUser Profiles http://<site>/_vti_bin/userprofileservice.asmxSites http://<site>/_vti_bin/sites.asmxLists http://<site>/_vti_bin/lists.asmxPermissions http://<site>/_vti_bin/permissions.asmxCopy http://<site>/_vti_bin/copy.asmx
31 Public Web Services (25+6) in SharePoint
![Page 17: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/17.jpg)
Service Descriptions
Provides Humans with Operations and Signatures
![Page 18: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/18.jpg)
Web Service Definition Language
?WSDL
![Page 19: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/19.jpg)
Visual Studio Service Reference
SpecifyWeb Service URL
Browse AvailableOperations
Specify ProxyNamespace
Proxy ClassName
![Page 20: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/20.jpg)
Auto-generated Service ProxyCreate Proxy
Instance
Invoke Methods
ProcessOutput
SetCredentials
![Page 21: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/21.jpg)
spservices.codeplex.com
![Page 22: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/22.jpg)
Programming with SPServices
Create a Parameters Array
Anon Function forComplete
Invoke Library with Parameters
![Page 23: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/23.jpg)
Agenda
UnderstandingSharePoint Web
Services
Programming withSOAP-Based
Web Services
Programming with the Client-SideObject Model
Programming withthe ODATA RESTful
Web Services
![Page 24: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/24.jpg)
What is the CSOM?
Proprietary Microsoft SharePoint Client API
.NET / Silverlight / WP7 / ECMAScript
Mimics Server-side Object Model
Proprietary Message Transfer Format
![Page 25: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/25.jpg)
CSOM Architecture
![Page 26: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/26.jpg)
CSOM Considerations
• Efficient for Batch Operations• Familiar for SharePoint
Developers• Supports LINQ Queries• Works with Anonymous
• Less Efficient for Simple Operations• Unfamiliar to Web
Developers• Limited # of Client Runtimes• Microsoft Proprietary
![Page 27: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/27.jpg)
Context and Authentication (.NET)
Default isWindows
Authentication
![Page 28: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/28.jpg)
CSOM (ECMAScript)
Create a Context
Load the Context
Execute Async Query
Access Properties
![Page 29: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/29.jpg)
CSOM (.NET)
Create a Context
Load the Context
Execute Query
Access Properties
![Page 30: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/30.jpg)
CSOM Request
Protocol is documented, but you don’t want to be
hand-tooling these requests
![Page 31: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/31.jpg)
Client Library Assemblies
* Silverlight located at:
/15/Template/Layouts/Client
.NET assemblies found under
/15/ISAPI
![Page 32: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/32.jpg)
Client Components SDK
Installs all client runtime
components
![Page 33: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/33.jpg)
Agenda
UnderstandingSharePoint Web
Services
Programming withSOAP-Based
Web Services
Programming with the Client-SideObject Model
Programming withthe ODATA RESTful
Web Services
![Page 34: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/34.jpg)
What is REST?
Representational State Transfer
Web Addressable Resources / Hyperlink-able
Maps CRUD operations with HTTP Verbs
Commonly uses JSON for Data Messages
![Page 35: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/35.jpg)
REST Considerations
• Efficient for Batch Operations• Familiar for SharePoint
Developers• Supports LINQ Queries• Works with Anonymous
• Less Efficient for Simple Operations• Unfamiliar to Web
Developers• Limited # of Client Runtimes• Microsoft Proprietary
![Page 36: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/36.jpg)
www.odata.org
![Page 37: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/37.jpg)
ODATA Operations and Parameters
GET (Retrieve)POST (Create)PUT (Update All Fields)DELETE (Delete)MERGE (Update Specific)
$filter={simple predicate}$expand={Entity}$order by={property}$skip={n}$top={n}$metadata
Operations Parameters
![Page 38: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/38.jpg)
List Data Service (ECMA Script)
![Page 39: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/39.jpg)
More Information
Choose the Right API set with SharePoint 2013http://msdn.microsoft.com/en-us/library/jj164060.aspx
Complete Basic Operations with the SharePoint 2013 Client Libraryhttp://msdn.microsoft.com/en-us/library/fp179912.aspx
Programming using the SharePoint 2013 REST Servicehttp://msdn.microsoft.com/en-us/library/fp142385.aspx
SharePoint 2010 Web Serviceshttp://msdn.microsoft.com/en-us/library/ee705814(v=office.14).aspx
Accessing SharePoint 2010 Lists by Using WCF Data Serviceshttp://msdn.microsoft.com/en-us/library/hh134614(v=office.14).aspx
![Page 40: SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon](https://reader033.fdocuments.in/reader033/viewer/2022061218/54809663b4af9faf3a8b4649/html5/thumbnails/40.jpg)
Questions
Thank you for attending!
Please complete your evaluations. Your feedback is appreciated
chris@newsteplearning.
com
(425) 522-3727
@sharepointbits
blog.sharepointbits.co
m