info@newsteplearning.com                                                                            www.newsteplearning.co...
About Chris Beckett               Solution Architect              Learning Consultant                  and Trainer        ...
Agenda Introduction to SharePoint Web     Services                     SOAP          Client-Side                          ...
What is a Web Service?    A software system designed    to support interoperable    machine-to-machine    interaction over...
A Web Services Story1           2          34            5         6
Available SharePoint Web Services      SOAP              Client Side Object            ODATA    Web Services         Model...
SharePoint 2010 Web Service Access                          SOAP   CSOM   ODATA Lists and Libraries Site and List Settings...
SharePoint 2010 Web Service Clients                     SOAP   CSOM   ODATA JavaScript Silverlight .NET Windows Phone Othe...
SharePoint 2013 Web Service Access                             SOAP      CSOM   ODATA Lists and Libraries Site and List Se...
SharePoint 2010 Web Service Clients                        SOAP      CSOM   ODATA JavaScript Silverlight .NET Windows Phon...
Agenda                  Programming with                     SOAP-Based                    Web Services Understanding     ...
What is SOAP?           Created by Microsoft in 1998 / W3C Standard           Protocol Agnostic / Common to use HTTP      ...
SOAP Request Message Format                  SOAP Envelope                           SOAP Body             Method and     ...
SOAP Response Message Format                SOAP Envelope                                   SOAP Body                    R...
SOAP Considerations• All Versions of SharePoint      • Designed to work with Proxy• Ubiquitous                      • Not ...
SharePoint Web Service AddressesWeb Service     Web Service AddressSearch          http://<site>/_vti_bin/search.asmxUser ...
Service Descriptions                        Provides Humans                       with Operations and                     ...
Web Service Definition Language                            ?WSDL
Visual Studio Service Reference                            Specify                        Web Service URL                 ...
Auto-generated Service Proxy                       Create Proxy                         Instance                          ...
spservices.codeplex.com
Programming with SPServices                      Create a Parameters                             Array                    ...
Agenda                                     Programming with                                       the Client-Side         ...
What is the CSOM?            Proprietary Microsoft SharePoint Client API            .NET / Silverlight / WP7 / ECMAScript ...
CSOM Architecture
CSOM Considerations• Efficient for Batch Operations   • Less Efficient for Simple• Familiar for SharePoint            Oper...
Context and Authentication (.NET)                               Default is                               Windows          ...
CSOM (ECMAScript)                      Create a Context                     Load the Context                    Execute As...
CSOM (.NET)              Create a Context              Load the Context               Execute Query              Access Pr...
CSOM Request               Protocol is documented, but                you don’t want to be hand-                  tooling ...
Client Library Assemblies                      .NET assemblies found under                              /15/ISAPI         ...
Client Components SDK                        Installs all client                            runtime                       ...
Agenda                                                         Programming with                                           ...
What is REST?           Representational State Transfer           Web Addressable Resources / Hyperlink-able           Map...
REST Considerations• Efficient for Batch Operations   • Less Efficient for Simple• Familiar for SharePoint            Oper...
www.odata.org
ODATA Operations and Parameters         Operations                 ParametersGET (Retrieve)            $filter={simple pre...
List Data Service (ECMA Script)
More InformationChoose the Right API set with SharePoint 2013http://msdn.microsoft.com/en-us/library/jj164060.aspxComplete...
QuestionsThank you for attending!   chris@newsteplearning.com   (425) 522-3727   @sharepointbits   blog.sharepointbits.com...
Upcoming SlideShare
Loading in …5
×

SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon

1,292 views
1,130 views

Published on

Technical Class:

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,292
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
80
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon

  1. 1. info@newsteplearning.com www.newsteplearning.com (425) 522-3727Understanding and ProgrammingSharePoint Web Services Professional Learning Programs for Microsoft SharePoint, Office 365 and Windows Azure
  2. 2. About Chris Beckett Solution Architect Learning Consultant and Trainer @sharepointbits MCM MCT MCSE MCPD 24+10 blog.sharepointbits.com chris@newsteplearning.com
  3. 3. Agenda Introduction to SharePoint Web Services SOAP Client-Side REST API Web Services Object Model
  4. 4. What is a Web Service? A software system designed to support interoperable machine-to-machine interaction over a network W3C
  5. 5. A Web Services Story1 2 34 5 6
  6. 6. Available SharePoint Web Services SOAP Client Side Object ODATA Web Services Model (CSOM) Web Services• Open Standards • Microsoft Proprietary • Open Standards• RPC Model • Batch RPC Model • REST Model• Protocol Agnostic • Client Runtime • HTTP Only• XML • XML / JSON • ATOM / JSON
  7. 7. SharePoint 2010 Web Service Access SOAP CSOM ODATA Lists and Libraries Site and List Settings Site Security Workflow Search Managed Metadata User Profiles Publishing
  8. 8. SharePoint 2010 Web Service Clients SOAP CSOM ODATA JavaScript Silverlight .NET Windows Phone Other Languages InfoPath Receive InfoPath Submit BCS WCF Connector
  9. 9. SharePoint 2013 Web Service Access SOAP CSOM ODATA Lists and Libraries Site and List Settings Site Security Workflow Deprecated Search Managed Metadata User Profiles Publishing
  10. 10. SharePoint 2010 Web Service Clients SOAP CSOM ODATA JavaScript Silverlight .NET Windows Phone Deprecated Other Languages InfoPath Receive InfoPath Submit BCS WCF Connector
  11. 11. Agenda Programming with SOAP-Based Web Services Understanding Programming with Programming with SharePoint Web the Client-Side the ODATA RESTful Services Object Model Web Services
  12. 12. 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
  13. 13. SOAP Request Message Format SOAP Envelope SOAP Body Method and Parameters
  14. 14. SOAP Response Message Format SOAP Envelope SOAP Body Response Xml
  15. 15. SOAP Considerations• All Versions of SharePoint • Designed to work with Proxy• Ubiquitous • Not JavaScript Friendly • Protocol Agnostic • Verbose Xml Data • Language Agnostic • No Anonymous• Access to Enterprise Services
  16. 16. 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
  17. 17. Service Descriptions Provides Humans with Operations and Signatures
  18. 18. Web Service Definition Language ?WSDL
  19. 19. Visual Studio Service Reference Specify Web Service URL Proxy Class Name Browse Available Operations Specify Proxy Namespace
  20. 20. Auto-generated Service Proxy Create Proxy Instance Set Credentials Invoke Methods Process Output
  21. 21. spservices.codeplex.com
  22. 22. Programming with SPServices Create a Parameters Array Anon Function for Complete Invoke Library with Parameters
  23. 23. Agenda Programming with the Client-Side Object Model Understanding Programming with Programming with SharePoint Web SOAP-Based the ODATA RESTful Services Web Services Web Services
  24. 24. What is the CSOM? Proprietary Microsoft SharePoint Client API .NET / Silverlight / WP7 / ECMAScript Mimics Server-side Object Model Proprietary Message Transfer Format
  25. 25. CSOM Architecture
  26. 26. CSOM Considerations• Efficient for Batch Operations • Less Efficient for Simple• Familiar for SharePoint Operations Developers • Unfamiliar to Web Developers• Supports LINQ Queries • Limited # of Client Runtimes• Works with Anonymous • Microsoft Proprietary
  27. 27. Context and Authentication (.NET) Default is Windows Authentication
  28. 28. CSOM (ECMAScript) Create a Context Load the Context Execute Async Query Access Properties
  29. 29. CSOM (.NET) Create a Context Load the Context Execute Query Access Properties
  30. 30. CSOM Request Protocol is documented, but you don’t want to be hand- tooling these requests
  31. 31. Client Library Assemblies .NET assemblies found under /15/ISAPI * Silverlight located at: /15/Template/Layouts/Client
  32. 32. Client Components SDK Installs all client runtime components
  33. 33. Agenda Programming with the ODATA RESTful Web Services Understanding Programming with Programming with SharePoint Web SOAP-Based the Client-Side Services Web Services Object Model
  34. 34. What is REST? Representational State Transfer Web Addressable Resources / Hyperlink-able Maps CRUD operations with HTTP Verbs Commonly uses JSON for Data Messages
  35. 35. REST Considerations• Efficient for Batch Operations • Less Efficient for Simple• Familiar for SharePoint Operations Developers • Unfamiliar to Web Developers• Supports LINQ Queries • Limited # of Client Runtimes• Works with Anonymous • Microsoft Proprietary
  36. 36. www.odata.org
  37. 37. ODATA Operations and Parameters Operations ParametersGET (Retrieve) $filter={simple predicate}POST (Create) $expand={Entity}PUT (Update All Fields) $order by={property}DELETE (Delete) $skip={n}MERGE (Update Specific) $top={n} $metadata
  38. 38. List Data Service (ECMA Script)
  39. 39. More InformationChoose the Right API set with SharePoint 2013http://msdn.microsoft.com/en-us/library/jj164060.aspxComplete Basic Operations with the SharePoint 2013 Client Libraryhttp://msdn.microsoft.com/en-us/library/fp179912.aspxProgramming using the SharePoint 2013 REST Servicehttp://msdn.microsoft.com/en-us/library/fp142385.aspxSharePoint 2010 Web Serviceshttp://msdn.microsoft.com/en-us/library/ee705814(v=office.14).aspxAccessing SharePoint 2010 Lists by Using WCF Data Serviceshttp://msdn.microsoft.com/en-us/library/hh134614(v=office.14).aspx
  40. 40. QuestionsThank you for attending! chris@newsteplearning.com (425) 522-3727 @sharepointbits blog.sharepointbits.comPlease complete yourevaluations. Your feedback isappreciated 

×