Professional Documents
Culture Documents
Sahil Malik
www.winsmarts.com
Our SPJourney
SharePoint 2013 Basics SharePoint 2013 Behind the Scenes
Application
Modules Pages
Feature
Pages Receivers
WebParts Site Pages
80% of the code you will write in SharePoint 2013 will be Apps.
100% of that app-code, will use CSOM and REST.
THAT IS WHY!
And even if you dont intend to write Apps,
REST and CSOM is the preferred way of delivering functionality.
If it works using REST and CSOM, it will work as a sandbox solution, and it
will work in Office 365*
REST and CSOM are here to stay
Introduced in SharePoint 2010
Greatly expanded API in SharePoint 2013
Also added security constructs to support Apps
* There are some minor differences in the REST/CSOM API in Office 365
Synchronous vs. Asynchronous
FailHandler
DownloadDataAsync
(ex. TimeOutException)
ProcessData
Asynch Code Challenges Timing issues
Asynch Code Challenges - Concurrency
Async code challenges
Error handling
Different way of structuring your code, depending upon your platform of
choice.
Timing issues
Async/Await patterns, or Promises but something you have to consciously
architect and plan for.
Re-entrancy is another thing you have to guard against.
Concurrency
A lot of support is built into the API.
But you do have to understand how it works.
Concurrency, so how does it work?
The challenge
Multiple users updating the same data at the same time.
Who wins?
Approaches
Lock data on reads
Cant use this approach in a disconnected/distributed scenario.
Check for changes on save
The data that I am saving, does the current state of the data match what I had
queried?
Do I compare only changed columns, or all columns?
What if I do multiple queries, before one save?
Object Identity
The general theme
Exception
Handlers
CSOM/REST comparison
Security Piggy backs on transport security + OAuth Piggy backs on browser security + OAuth
Community support SharePoint specific some support. JavaScript and jQuery and REST are open
standards lots of support.
SharePoint REST and CSOM history
Server
Execute
Client OData Query
Server
Execute
Client OData Query