20
SharePoint Solutions with SPServices SPTechCon SFO 2013

SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

Embed Size (px)

DESCRIPTION

Technical Class: Monday, March 4 11:15 AM - 12:30 PM

Citation preview

Page 1: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

SharePoint Solutions with SPServices

SPTechCon SFO 2013

Page 2: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

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.

• Almost 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).

Page 3: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

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.

Page 4: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

Where Does SPServices Work?

Page 5: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

Where Do I Get SPServices?

http://spservices.codeplex.com/

Page 6: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

What Else Do I Need?

http://jquery.com

Page 7: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

How Does It All Fit Together?

Page 8: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

Add More Plugins

?

Page 9: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

Referencing Script Files

• Adding jQuery, SPServices, and jQueryUI

Referencing jQuery, jQueryUI, and SPServices from CDNs – Revisitedhttp://sympmarc.com/2013/02/07/referencing-jquery-jqueryui-and-spservices-from-cdns-revisited/

Page 10: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

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

Page 11: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

SPServices’ Core Functions

Page 12: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

Anatomy of an SPServices Call$().SPServices({ operation: "operationname",

});

[webURL: "/sitepath",] [option1: value1,] [option2: value2,] [async: false,]

completefunc: function (xData, Status) { ...do stuff...}

Page 13: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

How Does an SPServices Call Work?

XML

Page 14: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

Parsing Resultscompletefunc: function (xData, Status) { $(xData.responseXML).SPFilterNode("z:row").each(function() { var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>"; $("#tasksUL").append(liHtml); });}

• Alabama•Hawaii• Texas•North Dakota

<ul id="tasksUL"/>

Page 15: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

Value-Added Functions

• Combining multiple Web Services calls allows us to build cool functionality

• The value-added functions are useful and also prototypes for you to use to build your own functionality

Page 16: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

SPCascadingDropdowns

Page 17: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

SPDisplayRelatedInfo

Page 18: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

SPSetMultiSelectSizes

Page 19: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

Demos

Page 20: SharePoint Solutions with SPServices by Marc Anderson - SPTechCon

Contact InformationeMail marc.anderson@sympraxisconsulting.

comBlog http://sympmarc.com

SPServices http://spservices.codeplex.com

SPXSLT http://spxslt.codeplex.com

eBook http://bit.ly/UnlockingDVWP

The Middle Tier Manifesto

http://bit.ly/middletier