The SharePoint REST Framework was designed for SharePoint 2013, but works in both SharePoint 2013/2016 and Office 365. This framework is designed to remove the overhead of SharePoint development, allowing the developer to focus on the client requirements. A reference to the associated github projects are listed below:
- gd-sprest - An easy way to execute requests against the SharePoint 2013/Online REST api
- gd-sprest-react - Extends the Office Fabric React Framework with components designed for SharePoint 2013/Online.
- gd-sprest-webpart - A series of blog posts for creating a SharePoint 2013 modern webparts.
- gd-sprest-webparts - SharePoint 2013 modern react webpart examples.
gd-sprest vs pnp-js-core
The gd-sprest library is similar to the pnp-js-core, with the main difference being the ability to be used within the browser console window. This feature provides a “Powershell-Like” experience within the browser console window. Some reasons to use this functionality:
- No powershell or admin access to the server farm
- Ability to create scripts which can be tested in staging before running aginst production
- The intellisense and ability to make live requests allows for easy debug issues in production
- Easy way to perform research and development by exploring the REST API with the available intellisense
- Designed to work in restricted SharePoint environments with limited access to the SharePoint Farm, Web App, Site Collection, Root Web, etc.
Click Here to report any bugs, request any new features or if need help with code examples. Pull requests are welcomed for anyone interested in submitting them. Feel free to email for other questions.
The library has been designed to create the SharePoint object based on the response from the SharePoint REST API. This will allow us to easily stringify the request’s target information and the SharePoint REST API’s response to the local or storage session. A built-in stringify and parse method has been included in the library. Based on this design, SharePoint object will also contain all of its built-in methods.
One of the more important features of this framework is the intellisense. The classes have been setup to ensure the developer does not need to define the output type of the request. The “Types” and “SPTypes” classes can both be imported into the project. The “Types” class includes allows of the interfaces available in the library. The “SPTypes” class contains all of the enumerators in SharePoint. These interfaces can be used to provide intellisense for the custom variables.
The execution method was designed to give a server-side like experience, similar to SharePoint 2010/2013 solutions. This will help convert existing server-side solutions to client-side solutions.
The library contains various helpers to help with the various ways to develop against SharePoint 2013/Online
Modern Experience in SharePoint 2013
One of the key reasons of creating this libray, was to give an easy way to develop using the modern web stack in SharePoint 2013 environments.
Since these components are designed using same framework creating the new Office 365 modern experience, this gives the ability to introduce the new Office 365 experience within SharePoint 2013. This will be an important part for the SharePoint 2013 user adoption to the new modern experience. Most SharePoint 2010/2013 environments are undergoing upgrades to 2016, Hybrid 2016/O365, O365 and private O365-Gov environments.
The SharePoint Configuration automation feature allows the develoepr to easily create built-in scripts to install/uninstall SharePoint assets. This feature is designed to work in both SharePoint 2013 and Online.
The gd-sprest-react library contains various components designed to work in SharePoint 2013/Online.
Upgrade Path to SharePoint Framework SPFx
The REST api execute requests based on the user’s permissions. There is no way to elevate priviledges requests against the SharePoint REST.
Various Project Examples
The gd-sprest-webparts github project contains the latest code samples.
- Add/Remove Site Collection User Custom Actions
- Calendar Event Callout
- Office Fabric BCS List
- Office Fabric React
- Office Fabric UI Dashboard
- Query >5000 Items Example
- SharePoint JS-Link Starter Project
- SharePoint React/Redux Starter Project
- SharePoint Scripts Starter Project
- SharePoint React Components