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

Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Personfurqan222004
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Lucknow
 
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
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一3sw2qly1
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 

Recently uploaded (20)

Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Person
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
 
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
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 

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