using sharepoint 2013’s rest api with javascript / jquery for building client-side solutions
DESCRIPTION
Using SharePoint 2013’s REST API with JavaScript / jQuery for building client-side solutions. Who Craig Pilkenton. Solution Architect with Slalom Consulting SharePoint .NET SQL Server Powershell Started with “Tahoe” back in early 2000 [email protected] - PowerPoint PPT PresentationTRANSCRIPT
Using SharePoint 2013’s REST API with JavaScript / jQuery for building client-side solutions
CraigPilkentonSolution Architect, [email protected] http://www.linkedin.com/in/craigpilkenton
Solution Architect with Slalom Consulting SharePoint .NET SQL Server Powershell
Started with “Tahoe” back in early 2000
http://www.linkedin.com/in/craigpilkenton
WhoCraig Pilkenton
REST? Representational State Transfer – in SharePoint since 2010 version
Based on the OData protocol
Simply, it is a GET or POST in the URL to SharePoint, same as for retrieving web pages
Open a SharePoint _API URL, pass in Query String parameters to filter or sort the data, and get back simplified datasets of JSON or XML, just like an RSS or ATOM Feed
WhatSharePoint 2013 REST Interface
Why do I care? Can be accessed cross-browser and cross-platform
With Office 365, it’s one of only 2 ways to query or push data into SharePoint
Can use any standard Web languages such as JavaScript/jQuery or PHP, and any technology stack or language that supports REST to access almost all SharePoint capabilities and entities now
Doesn’t require loading up CSOM/JSOM libraries (and writing CAML queries!), unless specific entities are needed (e.g. Managed Metadata, Workflows, etc.)
Allows visualization of data beyond just what List Views or DataViews can do
WhyGetting things done quicker
What do I use?
FireFox with FireBug add-on is my favorite browser (need
to turn off Feed-Reading option)
Internet Explorer – F12 developer tools
SoapUI or Runscope.com
HowBrowsers
When’s a good choice?
Office 365 Napa apps, of course!
Single-Page Applications (SPA’s) to limit post-backs
Showing row data in a custom summed or grouped format
Creating picture rotators / banners or incorporating graphs and charts
WhenCustom views of data
Data Visualization / Forecasting Web Part
When…continued
Simple Applications
Employee Finder Web Part
When…continued
Simple ApplicationsJavaScript Web Part Fed from Lists and causes postback
Content By Search Web Part with Search Templates
Social Feeds Web Part
When…continued
Simple ApplicationsJavaScript Web Part with tabbed header of core feeds
Pulls in the last 3 public posts, formatted similar to application
“Save My Searches” Web Part
When…continued
Simple Applications
Captures and saves URL for ‘replaying’ SharePoint Searches
Send Feedback Web Part
When…continued
Simple ApplicationsJavaScript Web Part that saves without postback
All data queried from and stored in a SharePoint List
MSDN Magazine – Understanding and Using the SharePoint 2013 REST Interface
NothingButSharePoint.com – Using the updated SharePoint 2013 REST API versus the SharePoint 2010 model
CodeAcademy – jQuery Track
.appendTo() – Learn JavaScript/jQuery free
How-to’sLinks & Such
Questions?