Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

    Advertisements
  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand
  • Advertisements

Time to Move from SPServices to REST

Posted by Paul on May 22, 2015


In one of the SharePoint sessions, I found that the presenter is using SPServices.  Although, I have used SPServices before, I do not recommend using it for new projects, especially while SharePoint 2013 supports REST enabled services.

What is SPServices?

For those who are not aware of SPServices:

  • SPServices is a JQuery library which eases working with SharePoint ASMX web services
  • SPServices started supporting from MOSS 2007 to SharePoint 2010 to SharePoint 2013
  • SPServices is available from https://spservices.codeplex.com/

Following is an example of how SPServices looks like. (Courtesy)

image

What is REST?

A brief about REST enabled services in SharePoint 2013:

  • REST uses GET/POST/PUT/DELETE http-verbs for carrying the get/insert/update/delete operations on site, list, libraries
  • REST decreases the foot-print of application
  • REST supports JSON on top of XML enabling a broader client application integration with SharePoint
  • REST along with OData support provides advantages like filtering, combining etc.

Following is an example of how a REST service look like.

image

Please see References section for more examples.

Why to move to REST?

Following are the reasons Why we should move to REST from SPServices:

  1. More and more CSOM code are being exposed through REST
  2. SPServices was created before an era of CSOM and supports only XML
  3. In future ASMX web services can be deprecated creating a threat to existing SPServices solutions

Summary

Considering the above factors, I would not recommend new projects to be built using SPServices.  The new SharePoint Solution world is of REST and OData!

References

https://msdn.microsoft.com/en-us/magazine/dn198245.aspx

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s