SPServices is a widely used jQuery library that abstracts SharePoint's Web Services and makes them easier to use. It also includes functions that use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely on the client and requires no server install.
Using SharePoint’s Web Services client-side, you can provide your users a more “tactile” experience.
In this class, you'll learn how to use SPServices to build a more compelling user experience on top of SharePoint. We'll look at the most popular ""value-added"" SPServices functions as well as how you can use SPServices as part of your own development toolkit. We’ll also discuss how you should think about migrating from SPServices to REST calls and when it makes sense.
2. Who Is Marc?
• Co-Founder and President of Sympraxis Consulting LLC,
located in the Boston suburb of Newton, MA, USA.
Sympraxis focuses on enabling collaboration throughout the
enterprise using the SharePoint application platform.
• More than 30 years of experience in technology professional services and software
development. Over a wide-ranging career in consulting as well as line manager
positions, Marc has proven himself as a problem solver and leader who can solve
difficult technology problems for organizations across a wide variety of industries
and organization sizes.
• Three-time awardee of the Microsoft MVP award for SharePoint Server
(2011, 2012, 2013).
3. What Is SPServices?
SPServices is a jQuery library which
abstracts SharePoint's Web Services and
makes them easier to use. It also includes
functions which use the various Web
Service operations to provide more useful
(and cool) capabilities. It works entirely
client side and requires no server install.
SharePoint's first [useful] client side object
modelTM?
9. Script from CDNs
Referencing jQuery, jQueryUI, and SPServices from CDNs – Revisited
http://sympmarc.com/2013/02/07/referencing-jquery-jqueryui-and-spservices-from-cdns-revisited/
Note the protocol-less
references
10. What Can You Do with SPServices?
• SPServices Core
– Call SharePoint’s SOAP Web Services
– Parse the returned XML to provide page content or user
feedback
– Make changes to SharePoint objects
• Value-Added Functions
– Enhance forms
– Improve the user experience (UX)
15. Parsing Results: GetListItems Example
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";
$("#tasksUL").append(liHtml);
});
}
<ul id="tasksUL"/>
16. Value-Added Functions
• Combining multiple Web Services calls
allows us to build cool functionality
• Big focus on form enhancements to
improve the overall user experience (UX)
• The value-added functions are useful on
their own but also can be used as
prototypes for you to build your own
functionality
17. SPCascadingDropdowns
• Lets you set up cascading dropdowns on SharePoint forms (think Country /
Region/ State/ City)
• Enforces hierarchical relationships between column values using the
GetListItems operation of the Lists Web Service to refresh the allowable values
based on relationships which are maintained in reference lists
• Users manage the relational content in reference lists