SlideShare a Scribd company logo
1 of 39
REST API and
                             Client Object
                             Model for
                             SharePoint
                             Developer
Ram Yadav
Sr Consultant
Microsoft Corp.
MCM : SharePoint 2007/2010
Agenda

 Overview  of accessing Data in SharePoint
 Client Object Model
    .NET Client Object Model
    JavaScript and Client Object Model
 REST   & WCF Data Services
First , How it was 2007 and what
we have now in 2010 for
Accessing Data in SharePoint
Accessing Data in 2007
Web Services
 Web services are available
 for use
   _vit_bin/Lists.asmx
   _vit_bin/Sites.asmx
   _vit_bin/Webs.asmx
   ….
   …..
Why Client OM
 Disadvantages   of Web Services
    Web Services can be complicated
    Difficult to call from JavaScript
    Often custom wrapper services are created
    Customers solve the same problem over and over
     again
Accessing Data in 2010
Accessing data using REST
Integrating with SharePoint
   Web Services
       More coverage                                       Web Services
                                                            Advanced Operations
                                                            SharePoint Server
   Client Object Model                                     Operations
       Site, navigation
       security services                                    Client OM
                                                             Advanced List
       Very flexible and straight forward                   Operations
                                                             Site Operations
   REST                                                     Security
       Easiest to use                                         REST
       For fixed list schema                                  Working with list
                                                               data,
                                                               fixed schema
 RPC
   http://msdn.microsoft.com/en-us/library/ms478653.aspx
   Server Side code , List View , Data View
How do I utilize client object model in my windows apps?

.NET Client object model
Getting Started: 3 things to know
1. ClientContext is the central object
  clientContext =
  new ClientContext(“http://mysite”);

2. Before you read a property, you have to
ask for it

  clientContext.Load(list);

3. All requests must be committed in a batch

  clientContext.ExecuteQuery();
Client Application            Server

     Sequence of              Client.svc
     commands:
     command 1;
     command 2;           Execute commands
     command 3;              in the batch:
context.ExecuteQuery();      command 1;
                             command 2;
                             command 3;
    Process results        Send results back
Equivalent Objects
Server       .NET Managed            Silverlight             JavaScript
(Microsoft   (Microsoft.SharePoint   (Microsoft.SharePoint   (SP.js)
.SharePoint) .Client)                .Client.Silverlight)

SPContext     ClientContext          ClientContext           ClientContext

SPSite        Site                   Site                    Site

SPWeb         Web                    Web                     Web

SPList        List                   List                    List

SPListItem    ListItem               ListItem                ListItem

SPField       Field                  Field                   Field

Member names mostly the same from server to client
(e. g., SPWeb.QuickLaunchEnabled = Web.QuickLaunchEnabled)
.Net CLR Client OM
 Provides
         easy access from remote .NET clients to
 manipulate SharePoint data

 Can be utilized from managed code – also from
 office clients etc.

 Assemblies
    Microsoft.SharePoint.Client.dll (281kb)
    Microsoft.SharePoint.Client.Runtime.dll (145kb)
      To   Compare: Microsoft.SharePoint.dll – 15.3MB
.NET Client OM Code Example 1
ClientContext clictx = new ClientContext("http://intranet.contoso.com");
        Site s1 = clictx.Site;
        Web w1 = clictx.Site.RootWeb;

       clictx.Load(s1);
       clictx.Load(w1);
       clictx.ExecuteQuery();

       var lists1 = clictx.LoadQuery(w1.Lists);
       clictx.ExecuteQuery();

       var lists2 = clictx.LoadQuery(w1.Lists.Include(l => l.Title));
       clictx.ExecuteQuery();

       var query1 = from l1 in w1.Lists where l1.Title != null select l1;
       clictx.ExecuteQuery();
Client Object Model
ClientContext ctx = new ClientContext(“http://mysite”);
       Web web = ctx.Site.RootWeb;
       ctx.Load(web);

       ctx.Load(web, w => w.Title, w => w.Description);

       ctx.Load(web, w => w.Title,
              w => w.Lists .Include(l => l.Fields
                     .Include(f => f.InternalName,
                                       f => f.Group)));
Uploading file example
Client Object Model
Authentication
      Uses Windows Authentication by default
      Can be configured for Claims Based Authentication

ctx.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication;
ctx.FormsAuthenticationLoginInfo = new
        FormsAuthenticationLoginInfo("loginName", "password");
Client Object Model Limitations

 You  still need to handle synch/update semantics
  (change log could help)
 No elevation of privilege capabilities
 Requests are throttled
 .net CLR has sync method;
  Silverlight CLR and Jscript are async
21



Demo
The JavaScript Client Object
Model
Equivalent Objects
Server       .NET Managed            Silverlight             JavaScript
(Microsoft   (Microsoft.SharePoint   (Microsoft.SharePoint   (SP.js)
.SharePoint) .Client)                .Client.Silverlight)

SPContext     ClientContext          ClientContext           ClientContext

SPSite        Site                   Site                    Site

SPWeb         Web                    Web                     Web

SPList        List                   List                    List

SPListItem    ListItem               ListItem                ListItem

SPField       Field                  Field                   Field

Member names mostly the same from server to client
(e. g., SPWeb.QuickLaunchEnabled = Web.QuickLaunchEnabled)
JavaScript Client OM
 JavaScript
           Client OM is easily added to a SharePoint
  ASPX page - reference:
     _layouts/sp.js
     Add this using <SharePoint:ScriptLink>
 All   libraries crunched for performance
     Use un-crunched *.debug.js files with debug mode
 Method   signatures can be different compared to
  .NET and Silverlight
 Different data value types
JavaScript Client OM

 C:Program   FilesCommon
  FilesMicrosoft SharedWeb Server
  Extensions14TEMPLATELAYOUTS
 SP.js (SP.debug.js)
    380KB (559KB)
 SP.Core.js   (SP.Core.debug.js)
    13KB (20KB)
 SP.Runtime.js     (SP.Runtime.debug.js)
    68KB (108KB)
JavaScript Client OM
27




Java Script Client OM Demo
REST access to SharePoint data

REST & WCF Data Services
Why a RESTful Interface for SP?
 Why   REST
    It is a natural fit for SharePoint data
    Item == resource
    Uniform interface and addressing scheme
    Low barrier of entry, interoperability


 Why   WCF Data Services
    RESTful conventions & frameworks for data
    Builds on top of standard AtomPub
    Exactly the sort of convention we needed
    Consistent tools and client libraries
A RESTful Interface for Data
 Just   HTTP
     Items as resources, HTTP methods (GET, PUT, …) to act
     Leverage proxies, authentication, ETags, …
 Uniform    URL convention
     Every piece of information is addressable
     Predictable and flexible URL syntax
 Multiple   representations
     Use regular HTTP content-type negotiation
     JSON and Atom (full AtomPub support)
Accessing data using REST
Operations
 Operations    map to HTTP verbs
    Retrieve items/lists  GET
    Create new item  POST
    Update an item  PUT or MERGE
    Delete an item  DELETE
    These apply to links (lookups) as well


 SharePoint   rules apply during updates
    Validation, access control, etc.
URL Conventions
List of lists    …/_vti_bin/listdata.svc/
List             listdata.svc/Employees
Item          listdata.svc/Employees(123)
    Addressing lists and items
Single column listdata.svc/Employees(123)/Fullname
Lookup           listdata.svc/Employees(123)/Project
traversal
Raw value        listdata.svc/Employees(123)/Project/Title/$value
access


Sorting         listdata.svc/Employees?$orderby=Fullname
Filtering       listdata.svc/Employees?$filter=JobTitle eq 'SDE'
Projection      listdata.svc/Employees?$select=Fullname,JobTitle
Paging          listdata.svc/Employees?$top=10&$skip=30
Inline expansion listdata.svc/Employees?$expand=Project
34




REST Demo
Summary

 Overview  of accessing Data in SharePoint
 Client Object Model
    .NET Client Object Model
    JavaScript and Client Object Model
 REST   & WCF Data Services
Integrating with SharePoint
   Web Services
       More coverage                        Web Services
                                             Advanced Operations
                                             SharePoint Server
   Client Object Model                      Operations
       Site, navigation
       security services                     Client OM
                                              Advanced List
       Very flexible and straight forward    Operations
                                              Site Operations
                                              Security
   REST
       Easiest to use                          REST
                                                Working with list
       For fixed list schema
                                                data,
                                                fixed schema
 Server       Side OM
Accessing Data in 2010
Accessing data using REST
Rest API and Client OM for Developer

More Related Content

What's hot

Introducing SOA and Oracle SOA Suite 11g for Database Professionals
Introducing SOA and Oracle SOA Suite 11g for Database ProfessionalsIntroducing SOA and Oracle SOA Suite 11g for Database Professionals
Introducing SOA and Oracle SOA Suite 11g for Database ProfessionalsLucas Jellema
 
Introduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web ServicesIntroduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web Servicesecosio GmbH
 
Taking Advantage of the SharePoint 2013 REST API
Taking Advantage of the SharePoint 2013 REST APITaking Advantage of the SharePoint 2013 REST API
Taking Advantage of the SharePoint 2013 REST APIEric Shupps
 
Enterprise Software Architecture
Enterprise Software ArchitectureEnterprise Software Architecture
Enterprise Software Architecturerahmed_sct
 
SharePoint 2013 REST APIs
SharePoint 2013 REST APIsSharePoint 2013 REST APIs
SharePoint 2013 REST APIsGiuseppe Marchi
 
Windows Azure架构探析
Windows Azure架构探析Windows Azure架构探析
Windows Azure架构探析George Ang
 
Integrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio LightswitchIntegrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio LightswitchRob Windsor
 
SharePoint 2010 Client Object Model
SharePoint 2010 Client Object ModelSharePoint 2010 Client Object Model
SharePoint 2010 Client Object ModelG. Scott Singleton
 
Data Access Options in SharePoint 2010
Data Access Options in SharePoint 2010Data Access Options in SharePoint 2010
Data Access Options in SharePoint 2010Rob Windsor
 
Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.
Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.
Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.Eric Shupps
 
SFDC Inbound Integrations
SFDC Inbound IntegrationsSFDC Inbound Integrations
SFDC Inbound IntegrationsSujit Kumar
 
Siebel Web Architecture
Siebel Web ArchitectureSiebel Web Architecture
Siebel Web ArchitectureRoman Agaev
 
Introduction to the Client OM in SharePoint 2010
Introduction to the Client OM in SharePoint 2010Introduction to the Client OM in SharePoint 2010
Introduction to the Client OM in SharePoint 2010Ben Robb
 
Introduction to the SharePoint 2013 REST API
Introduction to the SharePoint 2013 REST APIIntroduction to the SharePoint 2013 REST API
Introduction to the SharePoint 2013 REST APISparkhound Inc.
 
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Services
Creating Flexible Data Services For Enterprise Soa With Wso2 Data ServicesCreating Flexible Data Services For Enterprise Soa With Wso2 Data Services
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Servicessumedha.r
 
Introduction to share point 2010 development
Introduction to share point 2010 developmentIntroduction to share point 2010 development
Introduction to share point 2010 developmentEric Shupps
 
SharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object ModelSharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object ModelPhil Wicklund
 
Oracle World 2002 Leverage Web Services in E-Business Applications
Oracle World 2002 Leverage Web Services in E-Business ApplicationsOracle World 2002 Leverage Web Services in E-Business Applications
Oracle World 2002 Leverage Web Services in E-Business ApplicationsRajesh Raheja
 
AAI 1713-Introduction to Java EE 7
AAI 1713-Introduction to Java EE 7AAI 1713-Introduction to Java EE 7
AAI 1713-Introduction to Java EE 7Kevin Sutter
 

What's hot (20)

Introducing SOA and Oracle SOA Suite 11g for Database Professionals
Introducing SOA and Oracle SOA Suite 11g for Database ProfessionalsIntroducing SOA and Oracle SOA Suite 11g for Database Professionals
Introducing SOA and Oracle SOA Suite 11g for Database Professionals
 
Introduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web ServicesIntroduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web Services
 
Taking Advantage of the SharePoint 2013 REST API
Taking Advantage of the SharePoint 2013 REST APITaking Advantage of the SharePoint 2013 REST API
Taking Advantage of the SharePoint 2013 REST API
 
Enterprise Software Architecture
Enterprise Software ArchitectureEnterprise Software Architecture
Enterprise Software Architecture
 
SharePoint 2013 REST APIs
SharePoint 2013 REST APIsSharePoint 2013 REST APIs
SharePoint 2013 REST APIs
 
Windows Azure架构探析
Windows Azure架构探析Windows Azure架构探析
Windows Azure架构探析
 
Integrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio LightswitchIntegrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio Lightswitch
 
SharePoint 2010 Client Object Model
SharePoint 2010 Client Object ModelSharePoint 2010 Client Object Model
SharePoint 2010 Client Object Model
 
Data Access Options in SharePoint 2010
Data Access Options in SharePoint 2010Data Access Options in SharePoint 2010
Data Access Options in SharePoint 2010
 
Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.
Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.
Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.
 
SFDC Inbound Integrations
SFDC Inbound IntegrationsSFDC Inbound Integrations
SFDC Inbound Integrations
 
Siebel Web Architecture
Siebel Web ArchitectureSiebel Web Architecture
Siebel Web Architecture
 
Introduction to the Client OM in SharePoint 2010
Introduction to the Client OM in SharePoint 2010Introduction to the Client OM in SharePoint 2010
Introduction to the Client OM in SharePoint 2010
 
Introduction to the SharePoint 2013 REST API
Introduction to the SharePoint 2013 REST APIIntroduction to the SharePoint 2013 REST API
Introduction to the SharePoint 2013 REST API
 
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Services
Creating Flexible Data Services For Enterprise Soa With Wso2 Data ServicesCreating Flexible Data Services For Enterprise Soa With Wso2 Data Services
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Services
 
Introduction to share point 2010 development
Introduction to share point 2010 developmentIntroduction to share point 2010 development
Introduction to share point 2010 development
 
SharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object ModelSharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object Model
 
Microsoft Azure
Microsoft AzureMicrosoft Azure
Microsoft Azure
 
Oracle World 2002 Leverage Web Services in E-Business Applications
Oracle World 2002 Leverage Web Services in E-Business ApplicationsOracle World 2002 Leverage Web Services in E-Business Applications
Oracle World 2002 Leverage Web Services in E-Business Applications
 
AAI 1713-Introduction to Java EE 7
AAI 1713-Introduction to Java EE 7AAI 1713-Introduction to Java EE 7
AAI 1713-Introduction to Java EE 7
 

Viewers also liked

تحلیل صنعت غذایی قسمت دوم
تحلیل صنعت غذایی قسمت دومتحلیل صنعت غذایی قسمت دوم
تحلیل صنعت غذایی قسمت دومARAM KHALILIFAR
 
INFORME SEGUNDO DEBATE SOLIDARIA RECONSTRUCCIÓN
INFORME SEGUNDO DEBATE SOLIDARIA RECONSTRUCCIÓN INFORME SEGUNDO DEBATE SOLIDARIA RECONSTRUCCIÓN
INFORME SEGUNDO DEBATE SOLIDARIA RECONSTRUCCIÓN Ela Zambrano
 
INFORME EJECUCIÓN PRESUPUESTARIA ENERO-JUNIO 2016
INFORME EJECUCIÓN PRESUPUESTARIA ENERO-JUNIO 2016INFORME EJECUCIÓN PRESUPUESTARIA ENERO-JUNIO 2016
INFORME EJECUCIÓN PRESUPUESTARIA ENERO-JUNIO 2016Ela Zambrano
 
Mapa Conceptual La Quiebra Danexis Pérez
Mapa Conceptual La Quiebra Danexis PérezMapa Conceptual La Quiebra Danexis Pérez
Mapa Conceptual La Quiebra Danexis PérezOslenny Rivero
 
HERRAMIENTAS DE RECUPERACIÓN DE PLUSVALÍA. EXPERIENCIA LIMA
HERRAMIENTAS DE RECUPERACIÓN DE PLUSVALÍA. EXPERIENCIA LIMAHERRAMIENTAS DE RECUPERACIÓN DE PLUSVALÍA. EXPERIENCIA LIMA
HERRAMIENTAS DE RECUPERACIÓN DE PLUSVALÍA. EXPERIENCIA LIMAEla Zambrano
 
COSTOS Y PRESUPUESTOS POR ORDENADOR
COSTOS Y PRESUPUESTOS POR ORDENADORCOSTOS Y PRESUPUESTOS POR ORDENADOR
COSTOS Y PRESUPUESTOS POR ORDENADORWILSON VELASTEGUI
 
Adam Kuettel - 5 Fintech Companies Worth Paying Attention To
Adam Kuettel - 5 Fintech Companies Worth Paying Attention ToAdam Kuettel - 5 Fintech Companies Worth Paying Attention To
Adam Kuettel - 5 Fintech Companies Worth Paying Attention ToAdam Kuettel
 
WALLS: A Manifesto For An Open Agency
WALLS: A Manifesto For An Open AgencyWALLS: A Manifesto For An Open Agency
WALLS: A Manifesto For An Open Agencysparks & honey
 
Containerize All the (Multi-Platform) Things! by Phil Estes
Containerize All the (Multi-Platform) Things! by Phil EstesContainerize All the (Multi-Platform) Things! by Phil Estes
Containerize All the (Multi-Platform) Things! by Phil EstesDocker, Inc.
 

Viewers also liked (14)

تحلیل صنعت غذایی قسمت دوم
تحلیل صنعت غذایی قسمت دومتحلیل صنعت غذایی قسمت دوم
تحلیل صنعت غذایی قسمت دوم
 
INFORME SEGUNDO DEBATE SOLIDARIA RECONSTRUCCIÓN
INFORME SEGUNDO DEBATE SOLIDARIA RECONSTRUCCIÓN INFORME SEGUNDO DEBATE SOLIDARIA RECONSTRUCCIÓN
INFORME SEGUNDO DEBATE SOLIDARIA RECONSTRUCCIÓN
 
INFORME EJECUCIÓN PRESUPUESTARIA ENERO-JUNIO 2016
INFORME EJECUCIÓN PRESUPUESTARIA ENERO-JUNIO 2016INFORME EJECUCIÓN PRESUPUESTARIA ENERO-JUNIO 2016
INFORME EJECUCIÓN PRESUPUESTARIA ENERO-JUNIO 2016
 
STaR Chart
STaR ChartSTaR Chart
STaR Chart
 
6
66
6
 
Mapa Conceptual La Quiebra Danexis Pérez
Mapa Conceptual La Quiebra Danexis PérezMapa Conceptual La Quiebra Danexis Pérez
Mapa Conceptual La Quiebra Danexis Pérez
 
HERRAMIENTAS DE RECUPERACIÓN DE PLUSVALÍA. EXPERIENCIA LIMA
HERRAMIENTAS DE RECUPERACIÓN DE PLUSVALÍA. EXPERIENCIA LIMAHERRAMIENTAS DE RECUPERACIÓN DE PLUSVALÍA. EXPERIENCIA LIMA
HERRAMIENTAS DE RECUPERACIÓN DE PLUSVALÍA. EXPERIENCIA LIMA
 
Sucesoral trabajo actividad 1
Sucesoral trabajo actividad 1Sucesoral trabajo actividad 1
Sucesoral trabajo actividad 1
 
Taller dolarizacion
Taller dolarizacionTaller dolarizacion
Taller dolarizacion
 
Lumen Gentium
 Lumen Gentium Lumen Gentium
Lumen Gentium
 
COSTOS Y PRESUPUESTOS POR ORDENADOR
COSTOS Y PRESUPUESTOS POR ORDENADORCOSTOS Y PRESUPUESTOS POR ORDENADOR
COSTOS Y PRESUPUESTOS POR ORDENADOR
 
Adam Kuettel - 5 Fintech Companies Worth Paying Attention To
Adam Kuettel - 5 Fintech Companies Worth Paying Attention ToAdam Kuettel - 5 Fintech Companies Worth Paying Attention To
Adam Kuettel - 5 Fintech Companies Worth Paying Attention To
 
WALLS: A Manifesto For An Open Agency
WALLS: A Manifesto For An Open AgencyWALLS: A Manifesto For An Open Agency
WALLS: A Manifesto For An Open Agency
 
Containerize All the (Multi-Platform) Things! by Phil Estes
Containerize All the (Multi-Platform) Things! by Phil EstesContainerize All the (Multi-Platform) Things! by Phil Estes
Containerize All the (Multi-Platform) Things! by Phil Estes
 

Similar to Rest API and Client OM for Developer

Programming SharePoint 2010 with Visual Studio 2010
Programming SharePoint 2010 with Visual Studio 2010Programming SharePoint 2010 with Visual Studio 2010
Programming SharePoint 2010 with Visual Studio 2010Quang Nguyễn Bá
 
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio AnguloLuis Du Solier
 
Time for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web ServicesTime for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web Servicesukdpe
 
Full Stack Developer
Full Stack DeveloperFull Stack Developer
Full Stack DeveloperAkbar Uddin
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Igor Moochnick
 
RESTful Data Services with the ADO.NET Data Services Framework
RESTful Data Services with the ADO.NET Data Services FrameworkRESTful Data Services with the ADO.NET Data Services Framework
RESTful Data Services with the ADO.NET Data Services Frameworkgoodfriday
 
Xamarin Workshop Noob to Master – Week 5
Xamarin Workshop Noob to Master – Week 5Xamarin Workshop Noob to Master – Week 5
Xamarin Workshop Noob to Master – Week 5Charlin Agramonte
 
ADO.NET Data Services
ADO.NET Data ServicesADO.NET Data Services
ADO.NET Data Servicesukdpe
 
C# and ASP.NET Code and Data-Access Security
C# and ASP.NET Code and Data-Access SecurityC# and ASP.NET Code and Data-Access Security
C# and ASP.NET Code and Data-Access SecurityDarren Sim
 
Introducing SQL Server Data Services
Introducing SQL Server Data ServicesIntroducing SQL Server Data Services
Introducing SQL Server Data Servicesgoodfriday
 
Introducing SQL Server Data Services
Introducing SQL Server Data ServicesIntroducing SQL Server Data Services
Introducing SQL Server Data Servicesgoodfriday
 
Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012daniel plocker
 
Windows Azure and a little SQL Data Services
Windows Azure and a little SQL Data ServicesWindows Azure and a little SQL Data Services
Windows Azure and a little SQL Data Servicesukdpe
 
SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...Liam Cleary [MVP]
 
Developing for Astoria: ADO.NET Data Services
Developing for Astoria: ADO.NET Data ServicesDeveloping for Astoria: ADO.NET Data Services
Developing for Astoria: ADO.NET Data ServicesHarish Ranganathan
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?ukdpe
 
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworksukdpe
 
Wss Object Model
Wss Object ModelWss Object Model
Wss Object Modelmaddinapudi
 
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...BlueMetalInc
 

Similar to Rest API and Client OM for Developer (20)

Programming SharePoint 2010 with Visual Studio 2010
Programming SharePoint 2010 with Visual Studio 2010Programming SharePoint 2010 with Visual Studio 2010
Programming SharePoint 2010 with Visual Studio 2010
 
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
 
Time for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web ServicesTime for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web Services
 
Full Stack Developer
Full Stack DeveloperFull Stack Developer
Full Stack Developer
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
 
Developing With Data Technologies
Developing With Data TechnologiesDeveloping With Data Technologies
Developing With Data Technologies
 
RESTful Data Services with the ADO.NET Data Services Framework
RESTful Data Services with the ADO.NET Data Services FrameworkRESTful Data Services with the ADO.NET Data Services Framework
RESTful Data Services with the ADO.NET Data Services Framework
 
Xamarin Workshop Noob to Master – Week 5
Xamarin Workshop Noob to Master – Week 5Xamarin Workshop Noob to Master – Week 5
Xamarin Workshop Noob to Master – Week 5
 
ADO.NET Data Services
ADO.NET Data ServicesADO.NET Data Services
ADO.NET Data Services
 
C# and ASP.NET Code and Data-Access Security
C# and ASP.NET Code and Data-Access SecurityC# and ASP.NET Code and Data-Access Security
C# and ASP.NET Code and Data-Access Security
 
Introducing SQL Server Data Services
Introducing SQL Server Data ServicesIntroducing SQL Server Data Services
Introducing SQL Server Data Services
 
Introducing SQL Server Data Services
Introducing SQL Server Data ServicesIntroducing SQL Server Data Services
Introducing SQL Server Data Services
 
Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012
 
Windows Azure and a little SQL Data Services
Windows Azure and a little SQL Data ServicesWindows Azure and a little SQL Data Services
Windows Azure and a little SQL Data Services
 
SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...
 
Developing for Astoria: ADO.NET Data Services
Developing for Astoria: ADO.NET Data ServicesDeveloping for Astoria: ADO.NET Data Services
Developing for Astoria: ADO.NET Data Services
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
 
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
 
Wss Object Model
Wss Object ModelWss Object Model
Wss Object Model
 
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
 

More from InnoTech

"So you want to raise funding and build a team?"
"So you want to raise funding and build a team?""So you want to raise funding and build a team?"
"So you want to raise funding and build a team?"InnoTech
 
Artificial Intelligence is Maturing
Artificial Intelligence is MaturingArtificial Intelligence is Maturing
Artificial Intelligence is MaturingInnoTech
 
What is AI without Data?
What is AI without Data?What is AI without Data?
What is AI without Data?InnoTech
 
Courageous Leadership - When it Matters Most
Courageous Leadership - When it Matters MostCourageous Leadership - When it Matters Most
Courageous Leadership - When it Matters MostInnoTech
 
The Gathering Storm
The Gathering StormThe Gathering Storm
The Gathering StormInnoTech
 
Sql Server tips from the field
Sql Server tips from the fieldSql Server tips from the field
Sql Server tips from the fieldInnoTech
 
Quantum Computing and its security implications
Quantum Computing and its security implicationsQuantum Computing and its security implications
Quantum Computing and its security implicationsInnoTech
 
Converged Infrastructure
Converged InfrastructureConverged Infrastructure
Converged InfrastructureInnoTech
 
Making the most out of collaboration with Office 365
Making the most out of collaboration with Office 365Making the most out of collaboration with Office 365
Making the most out of collaboration with Office 365InnoTech
 
Blockchain use cases and case studies
Blockchain use cases and case studiesBlockchain use cases and case studies
Blockchain use cases and case studiesInnoTech
 
Blockchain: Exploring the Fundamentals and Promising Potential
Blockchain: Exploring the Fundamentals and Promising Potential Blockchain: Exploring the Fundamentals and Promising Potential
Blockchain: Exploring the Fundamentals and Promising Potential InnoTech
 
Business leaders are engaging labor differently - Is your IT ready?
Business leaders are engaging labor differently - Is your IT ready?Business leaders are engaging labor differently - Is your IT ready?
Business leaders are engaging labor differently - Is your IT ready?InnoTech
 
AI 3.0: Is it Finally Time for Artificial Intelligence and Sensor Networks to...
AI 3.0: Is it Finally Time for Artificial Intelligence and Sensor Networks to...AI 3.0: Is it Finally Time for Artificial Intelligence and Sensor Networks to...
AI 3.0: Is it Finally Time for Artificial Intelligence and Sensor Networks to...InnoTech
 
Using Business Intelligence to Bring Your Data to Life
Using Business Intelligence to Bring Your Data to LifeUsing Business Intelligence to Bring Your Data to Life
Using Business Intelligence to Bring Your Data to LifeInnoTech
 
User requirements is a fallacy
User requirements is a fallacyUser requirements is a fallacy
User requirements is a fallacyInnoTech
 
What I Wish I Knew Before I Signed that Contract - San Antonio
What I Wish I Knew Before I Signed that Contract - San Antonio What I Wish I Knew Before I Signed that Contract - San Antonio
What I Wish I Knew Before I Signed that Contract - San Antonio InnoTech
 
Disaster Recovery Plan - Quorum
Disaster Recovery Plan - QuorumDisaster Recovery Plan - Quorum
Disaster Recovery Plan - QuorumInnoTech
 
Share point saturday access services 2015 final 2
Share point saturday access services 2015 final 2Share point saturday access services 2015 final 2
Share point saturday access services 2015 final 2InnoTech
 
Sp tech festdallas - office 365 groups - planner session
Sp tech festdallas - office 365 groups - planner sessionSp tech festdallas - office 365 groups - planner session
Sp tech festdallas - office 365 groups - planner sessionInnoTech
 
Power apps presentation
Power apps presentationPower apps presentation
Power apps presentationInnoTech
 

More from InnoTech (20)

"So you want to raise funding and build a team?"
"So you want to raise funding and build a team?""So you want to raise funding and build a team?"
"So you want to raise funding and build a team?"
 
Artificial Intelligence is Maturing
Artificial Intelligence is MaturingArtificial Intelligence is Maturing
Artificial Intelligence is Maturing
 
What is AI without Data?
What is AI without Data?What is AI without Data?
What is AI without Data?
 
Courageous Leadership - When it Matters Most
Courageous Leadership - When it Matters MostCourageous Leadership - When it Matters Most
Courageous Leadership - When it Matters Most
 
The Gathering Storm
The Gathering StormThe Gathering Storm
The Gathering Storm
 
Sql Server tips from the field
Sql Server tips from the fieldSql Server tips from the field
Sql Server tips from the field
 
Quantum Computing and its security implications
Quantum Computing and its security implicationsQuantum Computing and its security implications
Quantum Computing and its security implications
 
Converged Infrastructure
Converged InfrastructureConverged Infrastructure
Converged Infrastructure
 
Making the most out of collaboration with Office 365
Making the most out of collaboration with Office 365Making the most out of collaboration with Office 365
Making the most out of collaboration with Office 365
 
Blockchain use cases and case studies
Blockchain use cases and case studiesBlockchain use cases and case studies
Blockchain use cases and case studies
 
Blockchain: Exploring the Fundamentals and Promising Potential
Blockchain: Exploring the Fundamentals and Promising Potential Blockchain: Exploring the Fundamentals and Promising Potential
Blockchain: Exploring the Fundamentals and Promising Potential
 
Business leaders are engaging labor differently - Is your IT ready?
Business leaders are engaging labor differently - Is your IT ready?Business leaders are engaging labor differently - Is your IT ready?
Business leaders are engaging labor differently - Is your IT ready?
 
AI 3.0: Is it Finally Time for Artificial Intelligence and Sensor Networks to...
AI 3.0: Is it Finally Time for Artificial Intelligence and Sensor Networks to...AI 3.0: Is it Finally Time for Artificial Intelligence and Sensor Networks to...
AI 3.0: Is it Finally Time for Artificial Intelligence and Sensor Networks to...
 
Using Business Intelligence to Bring Your Data to Life
Using Business Intelligence to Bring Your Data to LifeUsing Business Intelligence to Bring Your Data to Life
Using Business Intelligence to Bring Your Data to Life
 
User requirements is a fallacy
User requirements is a fallacyUser requirements is a fallacy
User requirements is a fallacy
 
What I Wish I Knew Before I Signed that Contract - San Antonio
What I Wish I Knew Before I Signed that Contract - San Antonio What I Wish I Knew Before I Signed that Contract - San Antonio
What I Wish I Knew Before I Signed that Contract - San Antonio
 
Disaster Recovery Plan - Quorum
Disaster Recovery Plan - QuorumDisaster Recovery Plan - Quorum
Disaster Recovery Plan - Quorum
 
Share point saturday access services 2015 final 2
Share point saturday access services 2015 final 2Share point saturday access services 2015 final 2
Share point saturday access services 2015 final 2
 
Sp tech festdallas - office 365 groups - planner session
Sp tech festdallas - office 365 groups - planner sessionSp tech festdallas - office 365 groups - planner session
Sp tech festdallas - office 365 groups - planner session
 
Power apps presentation
Power apps presentationPower apps presentation
Power apps presentation
 

Recently uploaded

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 

Recently uploaded (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 

Rest API and Client OM for Developer

  • 1. REST API and Client Object Model for SharePoint Developer Ram Yadav Sr Consultant Microsoft Corp. MCM : SharePoint 2007/2010
  • 2. Agenda  Overview of accessing Data in SharePoint  Client Object Model  .NET Client Object Model  JavaScript and Client Object Model  REST & WCF Data Services
  • 3. First , How it was 2007 and what we have now in 2010 for Accessing Data in SharePoint
  • 5. Web Services Web services are available for use _vit_bin/Lists.asmx _vit_bin/Sites.asmx _vit_bin/Webs.asmx …. …..
  • 6. Why Client OM  Disadvantages of Web Services  Web Services can be complicated  Difficult to call from JavaScript  Often custom wrapper services are created  Customers solve the same problem over and over again
  • 8.
  • 10. Integrating with SharePoint  Web Services  More coverage Web Services Advanced Operations SharePoint Server  Client Object Model Operations  Site, navigation  security services Client OM Advanced List  Very flexible and straight forward Operations Site Operations  REST Security  Easiest to use REST  For fixed list schema Working with list data, fixed schema  RPC  http://msdn.microsoft.com/en-us/library/ms478653.aspx  Server Side code , List View , Data View
  • 11. How do I utilize client object model in my windows apps? .NET Client object model
  • 12. Getting Started: 3 things to know 1. ClientContext is the central object clientContext = new ClientContext(“http://mysite”); 2. Before you read a property, you have to ask for it clientContext.Load(list); 3. All requests must be committed in a batch clientContext.ExecuteQuery();
  • 13. Client Application Server Sequence of Client.svc commands: command 1; command 2; Execute commands command 3; in the batch: context.ExecuteQuery(); command 1; command 2; command 3; Process results Send results back
  • 14. Equivalent Objects Server .NET Managed Silverlight JavaScript (Microsoft (Microsoft.SharePoint (Microsoft.SharePoint (SP.js) .SharePoint) .Client) .Client.Silverlight) SPContext ClientContext ClientContext ClientContext SPSite Site Site Site SPWeb Web Web Web SPList List List List SPListItem ListItem ListItem ListItem SPField Field Field Field Member names mostly the same from server to client (e. g., SPWeb.QuickLaunchEnabled = Web.QuickLaunchEnabled)
  • 15. .Net CLR Client OM  Provides easy access from remote .NET clients to manipulate SharePoint data  Can be utilized from managed code – also from office clients etc.  Assemblies  Microsoft.SharePoint.Client.dll (281kb)  Microsoft.SharePoint.Client.Runtime.dll (145kb)  To Compare: Microsoft.SharePoint.dll – 15.3MB
  • 16. .NET Client OM Code Example 1 ClientContext clictx = new ClientContext("http://intranet.contoso.com"); Site s1 = clictx.Site; Web w1 = clictx.Site.RootWeb; clictx.Load(s1); clictx.Load(w1); clictx.ExecuteQuery(); var lists1 = clictx.LoadQuery(w1.Lists); clictx.ExecuteQuery(); var lists2 = clictx.LoadQuery(w1.Lists.Include(l => l.Title)); clictx.ExecuteQuery(); var query1 = from l1 in w1.Lists where l1.Title != null select l1; clictx.ExecuteQuery();
  • 17. Client Object Model ClientContext ctx = new ClientContext(“http://mysite”); Web web = ctx.Site.RootWeb; ctx.Load(web); ctx.Load(web, w => w.Title, w => w.Description); ctx.Load(web, w => w.Title, w => w.Lists .Include(l => l.Fields .Include(f => f.InternalName, f => f.Group)));
  • 19. Client Object Model Authentication Uses Windows Authentication by default Can be configured for Claims Based Authentication ctx.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication; ctx.FormsAuthenticationLoginInfo = new FormsAuthenticationLoginInfo("loginName", "password");
  • 20. Client Object Model Limitations  You still need to handle synch/update semantics (change log could help)  No elevation of privilege capabilities  Requests are throttled  .net CLR has sync method; Silverlight CLR and Jscript are async
  • 22. The JavaScript Client Object Model
  • 23. Equivalent Objects Server .NET Managed Silverlight JavaScript (Microsoft (Microsoft.SharePoint (Microsoft.SharePoint (SP.js) .SharePoint) .Client) .Client.Silverlight) SPContext ClientContext ClientContext ClientContext SPSite Site Site Site SPWeb Web Web Web SPList List List List SPListItem ListItem ListItem ListItem SPField Field Field Field Member names mostly the same from server to client (e. g., SPWeb.QuickLaunchEnabled = Web.QuickLaunchEnabled)
  • 24. JavaScript Client OM  JavaScript Client OM is easily added to a SharePoint ASPX page - reference:  _layouts/sp.js  Add this using <SharePoint:ScriptLink>  All libraries crunched for performance  Use un-crunched *.debug.js files with debug mode  Method signatures can be different compared to .NET and Silverlight  Different data value types
  • 25. JavaScript Client OM  C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14TEMPLATELAYOUTS  SP.js (SP.debug.js)  380KB (559KB)  SP.Core.js (SP.Core.debug.js)  13KB (20KB)  SP.Runtime.js (SP.Runtime.debug.js)  68KB (108KB)
  • 28. REST access to SharePoint data REST & WCF Data Services
  • 29. Why a RESTful Interface for SP?  Why REST  It is a natural fit for SharePoint data  Item == resource  Uniform interface and addressing scheme  Low barrier of entry, interoperability  Why WCF Data Services  RESTful conventions & frameworks for data  Builds on top of standard AtomPub  Exactly the sort of convention we needed  Consistent tools and client libraries
  • 30. A RESTful Interface for Data  Just HTTP  Items as resources, HTTP methods (GET, PUT, …) to act  Leverage proxies, authentication, ETags, …  Uniform URL convention  Every piece of information is addressable  Predictable and flexible URL syntax  Multiple representations  Use regular HTTP content-type negotiation  JSON and Atom (full AtomPub support)
  • 32. Operations  Operations map to HTTP verbs  Retrieve items/lists  GET  Create new item  POST  Update an item  PUT or MERGE  Delete an item  DELETE  These apply to links (lookups) as well  SharePoint rules apply during updates  Validation, access control, etc.
  • 33. URL Conventions List of lists …/_vti_bin/listdata.svc/ List listdata.svc/Employees Item listdata.svc/Employees(123)  Addressing lists and items Single column listdata.svc/Employees(123)/Fullname Lookup listdata.svc/Employees(123)/Project traversal Raw value listdata.svc/Employees(123)/Project/Title/$value access Sorting listdata.svc/Employees?$orderby=Fullname Filtering listdata.svc/Employees?$filter=JobTitle eq 'SDE' Projection listdata.svc/Employees?$select=Fullname,JobTitle Paging listdata.svc/Employees?$top=10&$skip=30 Inline expansion listdata.svc/Employees?$expand=Project
  • 35. Summary  Overview of accessing Data in SharePoint  Client Object Model  .NET Client Object Model  JavaScript and Client Object Model  REST & WCF Data Services
  • 36. Integrating with SharePoint  Web Services  More coverage Web Services Advanced Operations SharePoint Server  Client Object Model Operations  Site, navigation  security services Client OM Advanced List  Very flexible and straight forward Operations Site Operations Security  REST  Easiest to use REST Working with list  For fixed list schema data, fixed schema  Server Side OM

Editor's Notes

  1. ryadav@microsoft.com
  2. http://msdn.microsoft.com/en-us/library/ee857094.aspxhttp://msdn.microsoft.com/en-us/library/hh185006
  3. listdata.svc/Employees?$orderby=Fullnamelistdata.svc/Employees?$filter=JobTitleeq &apos;SDE&apos;listdata.svc/Employees?$select=Fullname,JobTitlelistdata.svc/Employees?$top=10&amp;$skip=30listdata.svc/Employees?$expand=Project