SPSCBR - REST Service and jQuery AJAX
Climbed out of bed at 4am and drove myself and colleague Jumpei on a laughter-filled trip down to Canberra, where we had lots of fun at the SharePoint Saturday Canberra event.
Our best joke along the drive was debating whether Lake George is a real lake. Our most scary moment was when the car wouldn't start back up after we took a 10min powernap.
As promised, my slide deck and a zip file of the VS.NET solution that was shown.
While the concepts are still fresh you should build a rest service and see how this all works for you. Enjoy :-)
Special thanks to Ishai Sagi who saved the day with an innovative 2-laptop remote-each other and project via SVG port.
Ran out of time, I couldn't cover in more detail...
- How to pass multiple parameters to REST, via a POST operation - the example is in my script and Rest service, but commented out follow that pattern.
- jQuery AJAX calls are asynchronous, you can fire 4 requests at the same time and they will run in parallel. Number of asynchronous calls depends on browser but 4 is a common-minimum.
- Debugging javascript tips
- Packaging CSS/JS files in a sandbox solution tips
- Some consideration and discussions around sandbox solution webpart and quota
Files
- https://static1.squarespace.com/static/5527bff2e4b0b430660b0d10/5527c30de4b030eeeef09715/5527c30fe4b030eeeef0a042/1316867614343/SharePoint+REST+and+jQuery1.pptx
- https://static1.squarespace.com/static/5527bff2e4b0b430660b0d10/5527c30de4b030eeeef09715/5527c30fe4b030eeeef0a043/1316868647487/SPGSvcWp.zip
Related Links
- http://blogs.msdn.com/b/sharepointdev/archive/2011/02/22/calling-a-wcf-service-using-jquery-in-sharepoint.aspx
- http://www.wictorwilen.se/Post/Calling-a-WCF-Service-using-jQuery-in-SharePoint-the-correct-way.aspx
For 2007, unfortunately you can't easily do REST, but a lot of the SOAP service wrappers are done by awesome people so you don't have to do it yourself. Thank Marc.