SlideShare a Scribd company logo
1 of 30
Wonderful CSOM
Sonja Madsen
September 26th, 2015
Barcelona
@sonjamadsen sp2013.blogspot.com
dev@sonjasapps.com www.sonjasapps.com
Best International
Developer
CSOM
2007
SSOM
2010 2013
CSOM
2016 -
Client-Side Object Model
_API
CSOM in SharePoint 2013
CSOM advantages over REST
SSOM, JSOM, CSOM with PowerShell
What’s new
CSOM
DEMO, MVC, the app
REST
CSOM
_API
Resembles SharePoint Server API, SSOM
Strongly typed
Batch requests
Connection authentication to the server
Remote error handling
Lambda expressions
Object Browser
Covers more SharePoint API than REST
CSOM Advantages
using (var clientContext = spContext.CreateUserClientContextForSPHost())
{
if (clientContext != null)
{
WebCreationInformation creation = new WebCreationInformation();
creation.Url = webTitle;
creation.Title = webTitle;
Web newWeb = clientContext.Web.Webs.Add(creation);
clientContext.Load(newWeb);
clientContext.ExecuteQuery();
}
}
Strongly Typed CSOM
Query.ajax({ url: "http://<site url>/_api/web/webinfos/add",
type: "POST",
data: JSON.stringify(
{'parameters': { '__metadata': {
'type': 'SP.WebInfoCreationInformation' },
'Url': 'RestSubWeb',
'Title': 'RestSubWeb',
'Description': 'REST created web',
'Language':1033, 'WebTemplate':'sts',
'UseUniquePermissions':false} } ),
headers: { "accept": "application/json; odata=verbose",
"content-type":"application/json;odata=verbose",
"content-length": <length of post body>,
"X-RequestDigest": $("#__REQUESTDIGEST").val() },
success: doSuccess, error: doError });
Create site with REST
Batch Requests
CSOM
REST
_API
REST call form digest value expires after 30 min.
Connection Authentication to the server
Connection Authentication to the server
$.ajax({
url: _spPageContextInfo.siteAbsoluteUrl + "/_api/web/,,,",
method: "POST",
headers: {
"Accept": "application/json; odata=verbose",
"X-RequestDigest": $('#__REQUESTDIGEST').val()
},
success: function (data) {},
error: function (data, errorCode, errorMessage) {}
});
Structured Remote Exception Handling
context.Load(web);
.Where()
.Include()
.OrderBy()
Lambda Expressions
Object Browser
Server Side SSOM CSOM
using (SPSite site = new SPSite(projectweburl))
{
using (SPWeb web = site.RootWeb)
{
web.AllowUnsafeUpdates = true;
…
SPWebTemplatewebTemplate =
webTemplates[TemplateI];
…
//create project site
web.Webs.Add(webUrl,webTitle,"",
uint.Parse(lcid), webTemplate,false,false);
web.Update();
}
}
using (var clientContext =
spContext.CreateUserClientContextForSPHost())
{
if (clientContext != null)
{
WebCreationInformation creation = new
WebCreationInformation();
creation.Url = webTitle;
creation.Title = webTitle;
Web newWeb =
clientContext.Web.Webs.Add(creation);
clientContext.Load(newWeb);
clientContext.ExecuteQuery();
}
}
SSOM CSOM
ThmxTheme.SetThemeUrlForWeb(
siteWeb,currentweb.ServerRelativeUrl
+ "/_catalogs/theme/SK.thmx");
siteWeb.Update();
siteWeb.ApplyTheme(
colorPaletteFile.ServerRelativeUrl,
fontSchemeFile.ServerRelativeUrl,null, true);
siteWeb.Update();
clientContext.ExecuteQuery();
CSOM with JavaScript = JSOM
using (var context =
spContext.CreateUserClientContextForSPHost())
{
if (clientContext != null)
{
WebCreationInformation creation = new
WebCreationInformation();
creation.Url = webTitle;
creation.Title = webTitle;
Web newWeb =
clientContext.Web.Webs.Add(creation);
context.Load(newWeb);
context.ExecuteQuery();
}
}
var context = new SP.ClientContext();
var creation = new
SP.WebCreationInformation();
creation.set_title(webTitle);
creation.set_url(webTitle);
creation.set_webTemplate('STS#0');
var newWeb=
context.get_web().add(creation);
context.executeQueryAsync(Function.create
Delegate(this,this.onQuerySucceeded),
Function.createDelegate(this,
this.onQueryFailed));
}
C#JavaScript
ClientContext context= new
ClientContext("http://SiteUrl");
WebCreationInformation creation = new
WebCreationInformation();
creation.Url = "webTitle";
creation.Title = "webTitle";
Web newWeb =
context.Web.Webs.Add(creation);
context.Load(newWeb);
context.ExecuteQuery();
CSOM with PowerShell
using (var context =
spContext.CreateUserClientContextForSPHost())
{
if (clientContext != null)
{
WebCreationInformation creation = new
WebCreationInformation();
creation.Url = webTitle;
creation.Title = webTitle;
Web newWeb =
clientContext.Web.Webs.Add(creation);
context.Load(newWeb);
context.ExecuteQuery();
}
}
C#PowerShell
CSOM Online
What’s New
Visual Studio 2015
Summary
REST
CSOM
_API
Get stamps from all the sponsors
Deposit the passport to enter
the prize raffle
Good luck!
The SPSBCN Passport
FREE BEER!
Get your ticket at the registration
desk
Network and have fun with your
colleagues!
SharePint sponsored by
Michael Collins Pub
Plaça de Sagrada
Família
Starts at 19:30h
They help us improve
for SharePoint Saturday
2016!
Remember to fill your evaluation forms
Thanks to our Sponsors

More Related Content

What's hot

JSChannel 2017 - Service Workers and the Role they Play in modern day web-apps
JSChannel 2017 - Service Workers and the Role they Play in modern day web-appsJSChannel 2017 - Service Workers and the Role they Play in modern day web-apps
JSChannel 2017 - Service Workers and the Role they Play in modern day web-appsMukul Jain
 
Inspiring conference - Automation & external service integration
Inspiring conference -  Automation & external service integrationInspiring conference -  Automation & external service integration
Inspiring conference - Automation & external service integrationdfeyer
 
Creating asynchronous flows on AWS
Creating asynchronous flows on AWSCreating asynchronous flows on AWS
Creating asynchronous flows on AWSMetin Kale
 
Real life cross-platform application development using Xamarin Forms - Frank ...
Real life cross-platform application development using Xamarin Forms - Frank ...Real life cross-platform application development using Xamarin Forms - Frank ...
Real life cross-platform application development using Xamarin Forms - Frank ...Codemotion
 
Introduction about-ajax-framework
Introduction about-ajax-frameworkIntroduction about-ajax-framework
Introduction about-ajax-frameworkSakthi Bro
 
4Developers 2018: Let's get (a bit) more offline (Paweł Łukaszuk)
4Developers 2018: Let's get (a bit) more offline (Paweł Łukaszuk)4Developers 2018: Let's get (a bit) more offline (Paweł Łukaszuk)
4Developers 2018: Let's get (a bit) more offline (Paweł Łukaszuk)PROIDEA
 
Breaking the Server-Client Divide with Node.js and React
Breaking the Server-Client Divide with Node.js and ReactBreaking the Server-Client Divide with Node.js and React
Breaking the Server-Client Divide with Node.js and ReactDejan Glozic
 
Transakcyjność w django
Transakcyjność w djangoTransakcyjność w django
Transakcyjność w djangoMarcin Baran
 
Simple todo app with meteor
Simple todo app with meteorSimple todo app with meteor
Simple todo app with meteorAlex Long
 
Rust vs. Go: qual è il linguaggio più adatto al tuo progetto?
Rust vs. Go: qual è il linguaggio più adatto al tuo progetto?Rust vs. Go: qual è il linguaggio più adatto al tuo progetto?
Rust vs. Go: qual è il linguaggio più adatto al tuo progetto?Claudio Capobianco
 
Cutting edge HTML5 API you can use today (by Bohdan Rusinka)
 Cutting edge HTML5 API you can use today (by Bohdan Rusinka) Cutting edge HTML5 API you can use today (by Bohdan Rusinka)
Cutting edge HTML5 API you can use today (by Bohdan Rusinka)Binary Studio
 
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...Alessandro Molina
 
Esri Dev Summit 2009 Rest and Mvc Final
Esri Dev Summit 2009 Rest and Mvc FinalEsri Dev Summit 2009 Rest and Mvc Final
Esri Dev Summit 2009 Rest and Mvc Finalguestcd4688
 

What's hot (20)

JSChannel 2017 - Service Workers and the Role they Play in modern day web-apps
JSChannel 2017 - Service Workers and the Role they Play in modern day web-appsJSChannel 2017 - Service Workers and the Role they Play in modern day web-apps
JSChannel 2017 - Service Workers and the Role they Play in modern day web-apps
 
Inspiring conference - Automation & external service integration
Inspiring conference -  Automation & external service integrationInspiring conference -  Automation & external service integration
Inspiring conference - Automation & external service integration
 
Html web workers
Html web workersHtml web workers
Html web workers
 
SignalR
SignalRSignalR
SignalR
 
Learning Svelte
Learning SvelteLearning Svelte
Learning Svelte
 
Web sockets Introduction
Web sockets IntroductionWeb sockets Introduction
Web sockets Introduction
 
Why ruby on rails
Why ruby on railsWhy ruby on rails
Why ruby on rails
 
Creating asynchronous flows on AWS
Creating asynchronous flows on AWSCreating asynchronous flows on AWS
Creating asynchronous flows on AWS
 
Ajax and ASP.NET AJAX
Ajax and ASP.NET AJAXAjax and ASP.NET AJAX
Ajax and ASP.NET AJAX
 
Real life cross-platform application development using Xamarin Forms - Frank ...
Real life cross-platform application development using Xamarin Forms - Frank ...Real life cross-platform application development using Xamarin Forms - Frank ...
Real life cross-platform application development using Xamarin Forms - Frank ...
 
Introduction about-ajax-framework
Introduction about-ajax-frameworkIntroduction about-ajax-framework
Introduction about-ajax-framework
 
4Developers 2018: Let's get (a bit) more offline (Paweł Łukaszuk)
4Developers 2018: Let's get (a bit) more offline (Paweł Łukaszuk)4Developers 2018: Let's get (a bit) more offline (Paweł Łukaszuk)
4Developers 2018: Let's get (a bit) more offline (Paweł Łukaszuk)
 
Breaking the Server-Client Divide with Node.js and React
Breaking the Server-Client Divide with Node.js and ReactBreaking the Server-Client Divide with Node.js and React
Breaking the Server-Client Divide with Node.js and React
 
Transakcyjność w django
Transakcyjność w djangoTransakcyjność w django
Transakcyjność w django
 
Simple todo app with meteor
Simple todo app with meteorSimple todo app with meteor
Simple todo app with meteor
 
Rust vs. Go: qual è il linguaggio più adatto al tuo progetto?
Rust vs. Go: qual è il linguaggio più adatto al tuo progetto?Rust vs. Go: qual è il linguaggio più adatto al tuo progetto?
Rust vs. Go: qual è il linguaggio più adatto al tuo progetto?
 
Svelte JS introduction
Svelte JS introductionSvelte JS introduction
Svelte JS introduction
 
Cutting edge HTML5 API you can use today (by Bohdan Rusinka)
 Cutting edge HTML5 API you can use today (by Bohdan Rusinka) Cutting edge HTML5 API you can use today (by Bohdan Rusinka)
Cutting edge HTML5 API you can use today (by Bohdan Rusinka)
 
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...
 
Esri Dev Summit 2009 Rest and Mvc Final
Esri Dev Summit 2009 Rest and Mvc FinalEsri Dev Summit 2009 Rest and Mvc Final
Esri Dev Summit 2009 Rest and Mvc Final
 

Similar to Wonderful csom sps barcelona

05.SharePointCSOM
05.SharePointCSOM05.SharePointCSOM
05.SharePointCSOMEaswariSP
 
Share point app architecture for the cloud and on premise
Share point app architecture for the cloud and on premiseShare point app architecture for the cloud and on premise
Share point app architecture for the cloud and on premiseSonja Madsen
 
Introduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST APIIntroduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST APIRob Windsor
 
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...SharePoint Saturday NY
 
Windows 8 metro applications
Windows 8 metro applicationsWindows 8 metro applications
Windows 8 metro applicationsAlex Golesh
 
SharePoint 2013 APIs
SharePoint 2013 APIsSharePoint 2013 APIs
SharePoint 2013 APIsJohn Calvert
 
Wss Object Model
Wss Object ModelWss Object Model
Wss Object Modelmaddinapudi
 
Engaging users with live tiles and notifications
Engaging users with live tiles and notificationsEngaging users with live tiles and notifications
Engaging users with live tiles and notificationsAlex Golesh
 
Share point hosted add ins munich
Share point hosted add ins munichShare point hosted add ins munich
Share point hosted add ins munichSonja Madsen
 
Quick Fetch API Introduction
Quick Fetch API IntroductionQuick Fetch API Introduction
Quick Fetch API IntroductionChris Love
 
SharePoint Client Object Model (CSOM)
SharePoint Client Object Model (CSOM)SharePoint Client Object Model (CSOM)
SharePoint Client Object Model (CSOM)Kashif Imran
 
Workshop: Async and Parallel in C#
Workshop: Async and Parallel in C#Workshop: Async and Parallel in C#
Workshop: Async and Parallel in C#Rainer Stropek
 
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...SPTechCon
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with SpringJoshua Long
 
Javascript frameworks: Backbone.js
Javascript frameworks: Backbone.jsJavascript frameworks: Backbone.js
Javascript frameworks: Backbone.jsSoós Gábor
 
Test-driven Development with AEM
Test-driven Development with AEMTest-driven Development with AEM
Test-driven Development with AEMJan Wloka
 
4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...
4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...
4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...PROIDEA
 
13 asp.net session19
13 asp.net session1913 asp.net session19
13 asp.net session19Vivek chan
 
Unit Testing at Scale
Unit Testing at ScaleUnit Testing at Scale
Unit Testing at ScaleJan Wloka
 

Similar to Wonderful csom sps barcelona (20)

05.SharePointCSOM
05.SharePointCSOM05.SharePointCSOM
05.SharePointCSOM
 
Share point app architecture for the cloud and on premise
Share point app architecture for the cloud and on premiseShare point app architecture for the cloud and on premise
Share point app architecture for the cloud and on premise
 
Introduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST APIIntroduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST API
 
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
 
Windows 8 metro applications
Windows 8 metro applicationsWindows 8 metro applications
Windows 8 metro applications
 
SharePoint 2013 APIs
SharePoint 2013 APIsSharePoint 2013 APIs
SharePoint 2013 APIs
 
Wss Object Model
Wss Object ModelWss Object Model
Wss Object Model
 
Engaging users with live tiles and notifications
Engaging users with live tiles and notificationsEngaging users with live tiles and notifications
Engaging users with live tiles and notifications
 
State management
State managementState management
State management
 
Share point hosted add ins munich
Share point hosted add ins munichShare point hosted add ins munich
Share point hosted add ins munich
 
Quick Fetch API Introduction
Quick Fetch API IntroductionQuick Fetch API Introduction
Quick Fetch API Introduction
 
SharePoint Client Object Model (CSOM)
SharePoint Client Object Model (CSOM)SharePoint Client Object Model (CSOM)
SharePoint Client Object Model (CSOM)
 
Workshop: Async and Parallel in C#
Workshop: Async and Parallel in C#Workshop: Async and Parallel in C#
Workshop: Async and Parallel in C#
 
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
 
Javascript frameworks: Backbone.js
Javascript frameworks: Backbone.jsJavascript frameworks: Backbone.js
Javascript frameworks: Backbone.js
 
Test-driven Development with AEM
Test-driven Development with AEMTest-driven Development with AEM
Test-driven Development with AEM
 
4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...
4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...
4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...
 
13 asp.net session19
13 asp.net session1913 asp.net session19
13 asp.net session19
 
Unit Testing at Scale
Unit Testing at ScaleUnit Testing at Scale
Unit Testing at Scale
 

More from Sonja Madsen

SharePoint Framework, React, and Office UI sps Silicon Valley
SharePoint Framework, React, and Office UI sps Silicon ValleySharePoint Framework, React, and Office UI sps Silicon Valley
SharePoint Framework, React, and Office UI sps Silicon ValleySonja Madsen
 
Building SharePoint add-ins with JavaScript and c# sps Silicon Valley
Building SharePoint add-ins with JavaScript and c# sps Silicon ValleyBuilding SharePoint add-ins with JavaScript and c# sps Silicon Valley
Building SharePoint add-ins with JavaScript and c# sps Silicon ValleySonja Madsen
 
SharePoint Framework, React, and Office UI Fabric spc adriatics 2016
SharePoint Framework, React, and Office UI Fabric spc adriatics 2016SharePoint Framework, React, and Office UI Fabric spc adriatics 2016
SharePoint Framework, React, and Office UI Fabric spc adriatics 2016Sonja Madsen
 
SharePoint Framework, React and Office UI SPS Paris 2016 - d01
SharePoint Framework, React and Office UI SPS Paris 2016 - d01SharePoint Framework, React and Office UI SPS Paris 2016 - d01
SharePoint Framework, React and Office UI SPS Paris 2016 - d01Sonja Madsen
 
Working with a super model for SharePoint Tuga IT 2016
Working with a super model for SharePoint Tuga IT 2016Working with a super model for SharePoint Tuga IT 2016
Working with a super model for SharePoint Tuga IT 2016Sonja Madsen
 
SharePoint Framework SPS Madrid 2016
SharePoint Framework SPS Madrid 2016SharePoint Framework SPS Madrid 2016
SharePoint Framework SPS Madrid 2016Sonja Madsen
 
Cloud-first SharePoint JavaScript Add-ins - Collab 365
Cloud-first SharePoint JavaScript Add-ins - Collab 365Cloud-first SharePoint JavaScript Add-ins - Collab 365
Cloud-first SharePoint JavaScript Add-ins - Collab 365Sonja Madsen
 
Building Share Point add-ins with JavaScript and c# Microsoft Western Europe ...
Building Share Point add-ins with JavaScript and c# Microsoft Western Europe ...Building Share Point add-ins with JavaScript and c# Microsoft Western Europe ...
Building Share Point add-ins with JavaScript and c# Microsoft Western Europe ...Sonja Madsen
 
Office 365 security concerns, EU General Data Protection Regulation (GDPR)
Office 365 security concerns, EU General Data Protection Regulation (GDPR) Office 365 security concerns, EU General Data Protection Regulation (GDPR)
Office 365 security concerns, EU General Data Protection Regulation (GDPR) Sonja Madsen
 
Workshop supermodel munich
Workshop supermodel munichWorkshop supermodel munich
Workshop supermodel munichSonja Madsen
 
GitHub and Office 365 video Munich
GitHub and Office 365 video MunichGitHub and Office 365 video Munich
GitHub and Office 365 video MunichSonja Madsen
 
Branding Office 365 SharePoint Days
Branding Office 365 SharePoint DaysBranding Office 365 SharePoint Days
Branding Office 365 SharePoint DaysSonja Madsen
 
Quick start guide to java script frameworks for sharepoint add ins sharepoint...
Quick start guide to java script frameworks for sharepoint add ins sharepoint...Quick start guide to java script frameworks for sharepoint add ins sharepoint...
Quick start guide to java script frameworks for sharepoint add ins sharepoint...Sonja Madsen
 
Patterns in add ins espc15
Patterns in add ins espc15Patterns in add ins espc15
Patterns in add ins espc15Sonja Madsen
 
Branding Office 365 ESPC15
Branding Office 365 ESPC15Branding Office 365 ESPC15
Branding Office 365 ESPC15Sonja Madsen
 
Quick start guide to java script frameworks for sharepoint add ins oslo
Quick start guide to java script frameworks for sharepoint add ins osloQuick start guide to java script frameworks for sharepoint add ins oslo
Quick start guide to java script frameworks for sharepoint add ins osloSonja Madsen
 
Branding office 365 copenhagen
Branding office 365 copenhagenBranding office 365 copenhagen
Branding office 365 copenhagenSonja Madsen
 
JavaScript Frameworks for SharePoint add-ins Cambridge
JavaScript Frameworks for SharePoint add-ins CambridgeJavaScript Frameworks for SharePoint add-ins Cambridge
JavaScript Frameworks for SharePoint add-ins CambridgeSonja Madsen
 
Branding office 365 Netherlands
Branding office 365 NetherlandsBranding office 365 Netherlands
Branding office 365 NetherlandsSonja Madsen
 
Branding office 365
Branding office 365Branding office 365
Branding office 365Sonja Madsen
 

More from Sonja Madsen (20)

SharePoint Framework, React, and Office UI sps Silicon Valley
SharePoint Framework, React, and Office UI sps Silicon ValleySharePoint Framework, React, and Office UI sps Silicon Valley
SharePoint Framework, React, and Office UI sps Silicon Valley
 
Building SharePoint add-ins with JavaScript and c# sps Silicon Valley
Building SharePoint add-ins with JavaScript and c# sps Silicon ValleyBuilding SharePoint add-ins with JavaScript and c# sps Silicon Valley
Building SharePoint add-ins with JavaScript and c# sps Silicon Valley
 
SharePoint Framework, React, and Office UI Fabric spc adriatics 2016
SharePoint Framework, React, and Office UI Fabric spc adriatics 2016SharePoint Framework, React, and Office UI Fabric spc adriatics 2016
SharePoint Framework, React, and Office UI Fabric spc adriatics 2016
 
SharePoint Framework, React and Office UI SPS Paris 2016 - d01
SharePoint Framework, React and Office UI SPS Paris 2016 - d01SharePoint Framework, React and Office UI SPS Paris 2016 - d01
SharePoint Framework, React and Office UI SPS Paris 2016 - d01
 
Working with a super model for SharePoint Tuga IT 2016
Working with a super model for SharePoint Tuga IT 2016Working with a super model for SharePoint Tuga IT 2016
Working with a super model for SharePoint Tuga IT 2016
 
SharePoint Framework SPS Madrid 2016
SharePoint Framework SPS Madrid 2016SharePoint Framework SPS Madrid 2016
SharePoint Framework SPS Madrid 2016
 
Cloud-first SharePoint JavaScript Add-ins - Collab 365
Cloud-first SharePoint JavaScript Add-ins - Collab 365Cloud-first SharePoint JavaScript Add-ins - Collab 365
Cloud-first SharePoint JavaScript Add-ins - Collab 365
 
Building Share Point add-ins with JavaScript and c# Microsoft Western Europe ...
Building Share Point add-ins with JavaScript and c# Microsoft Western Europe ...Building Share Point add-ins with JavaScript and c# Microsoft Western Europe ...
Building Share Point add-ins with JavaScript and c# Microsoft Western Europe ...
 
Office 365 security concerns, EU General Data Protection Regulation (GDPR)
Office 365 security concerns, EU General Data Protection Regulation (GDPR) Office 365 security concerns, EU General Data Protection Regulation (GDPR)
Office 365 security concerns, EU General Data Protection Regulation (GDPR)
 
Workshop supermodel munich
Workshop supermodel munichWorkshop supermodel munich
Workshop supermodel munich
 
GitHub and Office 365 video Munich
GitHub and Office 365 video MunichGitHub and Office 365 video Munich
GitHub and Office 365 video Munich
 
Branding Office 365 SharePoint Days
Branding Office 365 SharePoint DaysBranding Office 365 SharePoint Days
Branding Office 365 SharePoint Days
 
Quick start guide to java script frameworks for sharepoint add ins sharepoint...
Quick start guide to java script frameworks for sharepoint add ins sharepoint...Quick start guide to java script frameworks for sharepoint add ins sharepoint...
Quick start guide to java script frameworks for sharepoint add ins sharepoint...
 
Patterns in add ins espc15
Patterns in add ins espc15Patterns in add ins espc15
Patterns in add ins espc15
 
Branding Office 365 ESPC15
Branding Office 365 ESPC15Branding Office 365 ESPC15
Branding Office 365 ESPC15
 
Quick start guide to java script frameworks for sharepoint add ins oslo
Quick start guide to java script frameworks for sharepoint add ins osloQuick start guide to java script frameworks for sharepoint add ins oslo
Quick start guide to java script frameworks for sharepoint add ins oslo
 
Branding office 365 copenhagen
Branding office 365 copenhagenBranding office 365 copenhagen
Branding office 365 copenhagen
 
JavaScript Frameworks for SharePoint add-ins Cambridge
JavaScript Frameworks for SharePoint add-ins CambridgeJavaScript Frameworks for SharePoint add-ins Cambridge
JavaScript Frameworks for SharePoint add-ins Cambridge
 
Branding office 365 Netherlands
Branding office 365 NetherlandsBranding office 365 Netherlands
Branding office 365 Netherlands
 
Branding office 365
Branding office 365Branding office 365
Branding office 365
 

Recently uploaded

VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsstephieert
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 

Recently uploaded (20)

VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 

Wonderful csom sps barcelona

  • 5. CSOM advantages over REST SSOM, JSOM, CSOM with PowerShell What’s new CSOM
  • 8.
  • 9. Resembles SharePoint Server API, SSOM Strongly typed Batch requests Connection authentication to the server Remote error handling Lambda expressions Object Browser Covers more SharePoint API than REST CSOM Advantages
  • 10. using (var clientContext = spContext.CreateUserClientContextForSPHost()) { if (clientContext != null) { WebCreationInformation creation = new WebCreationInformation(); creation.Url = webTitle; creation.Title = webTitle; Web newWeb = clientContext.Web.Webs.Add(creation); clientContext.Load(newWeb); clientContext.ExecuteQuery(); } } Strongly Typed CSOM
  • 11. Query.ajax({ url: "http://<site url>/_api/web/webinfos/add", type: "POST", data: JSON.stringify( {'parameters': { '__metadata': { 'type': 'SP.WebInfoCreationInformation' }, 'Url': 'RestSubWeb', 'Title': 'RestSubWeb', 'Description': 'REST created web', 'Language':1033, 'WebTemplate':'sts', 'UseUniquePermissions':false} } ), headers: { "accept": "application/json; odata=verbose", "content-type":"application/json;odata=verbose", "content-length": <length of post body>, "X-RequestDigest": $("#__REQUESTDIGEST").val() }, success: doSuccess, error: doError }); Create site with REST
  • 13. REST call form digest value expires after 30 min. Connection Authentication to the server
  • 14. Connection Authentication to the server $.ajax({ url: _spPageContextInfo.siteAbsoluteUrl + "/_api/web/,,,", method: "POST", headers: { "Accept": "application/json; odata=verbose", "X-RequestDigest": $('#__REQUESTDIGEST').val() }, success: function (data) {}, error: function (data, errorCode, errorMessage) {} });
  • 16.
  • 19.
  • 20. Server Side SSOM CSOM using (SPSite site = new SPSite(projectweburl)) { using (SPWeb web = site.RootWeb) { web.AllowUnsafeUpdates = true; … SPWebTemplatewebTemplate = webTemplates[TemplateI]; … //create project site web.Webs.Add(webUrl,webTitle,"", uint.Parse(lcid), webTemplate,false,false); web.Update(); } } using (var clientContext = spContext.CreateUserClientContextForSPHost()) { if (clientContext != null) { WebCreationInformation creation = new WebCreationInformation(); creation.Url = webTitle; creation.Title = webTitle; Web newWeb = clientContext.Web.Webs.Add(creation); clientContext.Load(newWeb); clientContext.ExecuteQuery(); } }
  • 22. CSOM with JavaScript = JSOM using (var context = spContext.CreateUserClientContextForSPHost()) { if (clientContext != null) { WebCreationInformation creation = new WebCreationInformation(); creation.Url = webTitle; creation.Title = webTitle; Web newWeb = clientContext.Web.Webs.Add(creation); context.Load(newWeb); context.ExecuteQuery(); } } var context = new SP.ClientContext(); var creation = new SP.WebCreationInformation(); creation.set_title(webTitle); creation.set_url(webTitle); creation.set_webTemplate('STS#0'); var newWeb= context.get_web().add(creation); context.executeQueryAsync(Function.create Delegate(this,this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed)); } C#JavaScript
  • 23. ClientContext context= new ClientContext("http://SiteUrl"); WebCreationInformation creation = new WebCreationInformation(); creation.Url = "webTitle"; creation.Title = "webTitle"; Web newWeb = context.Web.Webs.Add(creation); context.Load(newWeb); context.ExecuteQuery(); CSOM with PowerShell using (var context = spContext.CreateUserClientContextForSPHost()) { if (clientContext != null) { WebCreationInformation creation = new WebCreationInformation(); creation.Url = webTitle; creation.Title = webTitle; Web newWeb = clientContext.Web.Webs.Add(creation); context.Load(newWeb); context.ExecuteQuery(); } } C#PowerShell
  • 27. Get stamps from all the sponsors Deposit the passport to enter the prize raffle Good luck! The SPSBCN Passport
  • 28. FREE BEER! Get your ticket at the registration desk Network and have fun with your colleagues! SharePint sponsored by Michael Collins Pub Plaça de Sagrada Família Starts at 19:30h
  • 29. They help us improve for SharePoint Saturday 2016! Remember to fill your evaluation forms
  • 30. Thanks to our Sponsors

Editor's Notes

  1. Use this as the first slide in your slide deck