using sharepoint 2013’s rest api with javascript / jquery for building client-side solutions

13
Using SharePoint 2013’s REST API with JavaScript / jQuery for building client- side solutions Craig Pilkenton Solution Architect, National [email protected] 860.818.1803 http://www.linkedin.com/in/ craigpilkenton

Upload: neil-weaver

Post on 01-Jan-2016

44 views

Category:

Documents


1 download

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 Presentation

TRANSCRIPT

Page 1: Using SharePoint 2013’s  REST API with  JavaScript / jQuery  for building client-side solutions

Using SharePoint 2013’s REST API with JavaScript / jQuery for building client-side solutions

CraigPilkentonSolution Architect, [email protected] http://www.linkedin.com/in/craigpilkenton

Page 2: Using SharePoint 2013’s  REST API with  JavaScript / jQuery  for building client-side solutions

Solution Architect with Slalom Consulting SharePoint .NET SQL Server Powershell

Started with “Tahoe” back in early 2000

[email protected]

http://www.linkedin.com/in/craigpilkenton

WhoCraig Pilkenton

Page 3: Using SharePoint 2013’s  REST API with  JavaScript / jQuery  for building client-side solutions

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

Page 4: Using SharePoint 2013’s  REST API with  JavaScript / jQuery  for building client-side solutions

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

Page 5: Using SharePoint 2013’s  REST API with  JavaScript / jQuery  for building client-side solutions

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

Page 6: Using SharePoint 2013’s  REST API with  JavaScript / jQuery  for building client-side solutions

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

Page 7: Using SharePoint 2013’s  REST API with  JavaScript / jQuery  for building client-side solutions

Data Visualization / Forecasting Web Part

When…continued

Simple Applications

Page 8: Using SharePoint 2013’s  REST API with  JavaScript / jQuery  for building client-side solutions

Employee Finder Web Part

When…continued

Simple ApplicationsJavaScript Web Part Fed from Lists and causes postback

Content By Search Web Part with Search Templates

Page 9: Using SharePoint 2013’s  REST API with  JavaScript / jQuery  for building client-side solutions

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

Page 10: Using SharePoint 2013’s  REST API with  JavaScript / jQuery  for building client-side solutions

“Save My Searches” Web Part

When…continued

Simple Applications

Captures and saves URL for ‘replaying’ SharePoint Searches

Page 11: Using SharePoint 2013’s  REST API with  JavaScript / jQuery  for building client-side solutions

Send Feedback Web Part

When…continued

Simple ApplicationsJavaScript Web Part that saves without postback

All data queried from and stored in a SharePoint List

Page 13: Using SharePoint 2013’s  REST API with  JavaScript / jQuery  for building client-side solutions

Questions?