Contact

Technology

Apr 15, 2013

SharePoint 2013 – JavaScript, CSOM, and REST

Joshua Grear

Joshua Grear

Default image background

Nothing gets a developer more excited about a new software release than when the development API gets extended resulting in an easier development process! That is exactly what Microsoft has done with SharePoint 2013 and the Client-Side Object Model (CSOM). In this blog, we will explore how Microsoft extended CSOM to include additional capabilities and embraced the simplicity of REST.

Microsoft SharePoint 2010

Before we dive in, it is worth taking a look back at client-side customization in SharePoint 2010.  In the past, if you were looking to extend SharePoint pages directly with SharePoint from the client, you had to work with the client.svc WCF service endpoint (_vti_bin/client.svc). To do so, you had to choose either the Silverlight or JavaScript (JSOM) proxy. This approach certainly worked, but wasn’t very straightforward. I realized this first-hand while implementing several elements of Credera’s homepage (www.credera.com).

 

Open Data Protocol

Microsoft SharePoint 2013

With the release of SharePoint 2013, Microsoft has extended the CSOM to include many of the features not available in 2010. A few of these features include: Search, Taxonomy, User Profiles, and Publishing. Microsoft also simplified the usage of the client.svc WCF by aliasing its path from “_vti_bin/client.svc” to “_api.” However, in my opinion, the best improvement was the inclusion of a REST endpoint.

Increase business process efficiency and collaboration with Microsoft SharePoint

Explore Our Microsoft Consulting Services  →

Open Data Protocol (OData)

With the REST endpoint, we no longer need to work with one of the proxies. We can leverage the OData Protocol to easily perform CRUD operations on SharePoint.  With just a browser, we can perform any read operation, which makes self-discovery an easy way to learn the API and its structure. We won’t take the time to cover the benefits of REST and OData, but having the ability to cache results and use jQuery allows for better performance and an easier implementation.

Please note that REST is not yet appropriate for all implementations. It is only a subset of the functionality of JSOM.  Specifically, you may have trouble performing updates on Content Types or trying to change more than one list at a time. Likewise, JSOM has more documentation available. However, in most situations, REST should be considered for client-side SharePoint implementations.

If you are considering an implementation that involves CSOM, JavaScript, and REST, but don’t know which solution is right for you, we can help you determine the best approach. Credera has implemented a number of SharePoint solutions for clients across industries. To contact a SharePoint expert, email info@credera.com or call 972.759.1836.

Conversation Icon

Contact Us

Ready to achieve your vision? We're here to help.

We'd love to start a conversation. Fill out the form and we'll connect you with the right person.

Searching for a new career?

View job openings