Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.

Slides:



Advertisements
Similar presentations
Svetlin Nakov Director Training and Consulting Activities National Academy for Software Development (NASD) ASP.NET 3.5 New Features.
Advertisements

SharePoint 2010 Overview Presented by: Oscar Garcia
AJAX Development By Gary Mandela December 26,
Bob German Principal Architect Introduction to Cloud Hosted Apps Your apps here!
SharePoint and Knockout for the REST of Us
SharePoint 2010 Client Side Object Model. Agenda Introduction The Problem Client side vs Server Side Client Side Object Model – How it works – What can.
November 11, MCT, MCITP, MCTS, MCP SharePoint Architect for Planet Technologies. Working with SharePoint since – Administrator / Developer.
Go Live! Launching your MOSS Publishing site DEV435 Spencer Harbar.
SharePoint Forms All you ever wanted to know about forms but were afraid to ask.
Designing InfoPath Forms: The Dos and Donts Deploying InfoPath Forms: Making the right choice Adding custom business logicin case the built-in stuff isnt.
.NET 3.5 SP1 New features Enhancements Visual Studio 2008 SP1 New features Enhancements Additional features/enhancements.
Microsoft SharePoint 2010 technology for Developers
Designing, Deploying and Managing Workflow in SharePoint Sites Steve Heaney Product Development Manager OBS
©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July Solution Architect,Microsoft.
Creating Knockout User Experiences in SharePoint with JavaScript Making awesome with Knockout, jQuery and SharePoint REST.
Thomas Palmié Architect Microsoft Schweiz Implementierung eines mehrsprachigen Intranets basierend auf SharePoint 2010.
JQuery & SharePoint San Antonio Users Group – September Meeting September 22, 2009 Microsoft SharePoint Server.
Developing HTML5 Application using MVVM pattern Pekka Ylenius.
Randy Williams, MOSS MVP Senior Consultant Synergy Corporate Technologies.
IS 360 Course Introduction. Slide 2 What you will Learn (1) The role of Web servers and clients How to create HTML, XHTML, and HTML 5 pages suitable for.
SharePoint Saturday Sponsors Gold Bronze Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
Fraser Technical Solutions, LLC
Any host All components deployed to SharePoint Client side code App Web created for app Wrapper deployed to SharePoint Components deployed to.
©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 2013 Technical Preview and published July Introducing.
The new way to work together SharePoint Products Cloud Server Free.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Lightning Talk Fred Rodriguez Nguyen Do CPSC 473 May 6, 2012.
JavaScript & jQuery the missing manual Chapter 11
Facebook Like Solution in SharePoint Using JavaScript Amie Seisay
Bob German Principal Architect A New on SharePoint Development Building Light-Weight Web Parts with AngularJS
What’s New? – BCS 2013 Brett Lonsdale.  Co-founder of Lightning Tools  One of the hosts on the SharePoint Pod Show  Co-organizer of SharePoint Saturday.
Sustainable SharePoint 2010 Customizations By Bill Keys.
Spicing Up Web Parts Randy Williams SharePoint Hawaii User Group May 11, 2011.
Basic Developer Knowledge That Every SharePoint Admin Must Have Randy Williams, MVP MOSS Synergy Corporate Technologies
Ideas to Improve SharePoint Usage 4. What are these 4 Ideas? 1. 7 Steps to check SharePoint Health 2. Avoid common Deployment Mistakes 3. Analyze SharePoint.
Cross Site Integration “mashups” cross site scripting.
Sponsors Gold Silver Bronze Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
SharePoint Saturday Sponsors Gold Bronze Creating Knockout User Experiences in SharePoint with JavaScript Making awesome with Knockout, jQuery and SharePoint.
Dudok de Wit David.  Documents management in a deskless company  SharePoint Online as a solution  Redesigning the documentary organization  Interoperability.
Sponsors Gold Silver Bronze Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
The Web Developer’s Toolbox Steve Fabian e:
Michael Hofer Senior Consultant Microsoft Corporation.
Trunica Inc. 500 East Kennedy Blvd #300 Tampa, FL Cross Platform Mobile Apps With Cordova and Visual Studio 2015 © Copyright 2015.
ASP.NET (Active Server Page) SNU OOPSLA Lab. October 2005.
Yaroslav Pentsarskyy Involved in SharePoint since 2003 SharePoint MVP (2009- Present) Blog: sharemuch.com.
UNDERSTANDING YOUR OPTIONS FOR CLIENT-SIDE DEVELOPMENT IN OFFICE 365 Mark Rackley
Update: Office & SharePoint Development Feb 2016.
Microsoft SharePoint 2010 The business collaboration platform for the Enterprise and the Web.
Getting Started on Office Addin with AngularJS and Yeoman
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Modern Development Technologies in SharePoint SHAREPOINT SATURDAY OMAHA APRIL, 2016.
Wes Preston DEV 202. Audience: Info Workers, Dev A deeper dive into use-cases where client-side rendering (CSR) and SharePoint’s JS Link property can.
Bravely Take your Skills to the Next Level: Office Add-Ins John Liu SharePoint Gurus.
INTRODUCING HYBRID APP KAU with MICT PARK IT COMPANIES Supported by KOICA
Virtual techdays INDIA │ august 2010 Silverlight And SharePoint Saranya Sriram │ Developer Evangelist, Microsoft.
Apps for the modern enterprise INTRODUCTION TO SHAREPOINT AS A DEVELOPMENT PLATFORM RON COURVILLE.
Virtual techdays INDIA │ November 2010 SharePoint 2010 – Your one stop shop for all portal requirements Saranya Sriram │ Developer Evangelist, Microsoft.
Converting SharePoint on- premise Apps to Office 365 Jos Auker-Woor M377.
MVC 4.0, Knockout.js, Bootstrap and EF6.0 FAST, FLEXIBLE AND RESPONSIVE QUICK TO MARKET WEBSITES.
JQuery Fundamentals Introduction Tutorial Videos
Web API - Introduction AJAX, Spring Data REST SoftUni Team Web API
Integrating SharePoint 2010 with Office 2010
TechEd /1/2018 7:56 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Line of Business Solutions in SharePoint Online
Accessing and Surfacing LOB Data in SharePoint 2010
IS 360 Course Introduction
Intro to Client Side Solutions in SharePoint 2013
Developer Patterns to Integrate Silverlight 4.0 with SharePoint 2010
AngularJS and SharePoint I Chris Douglas Senior SharePoint Developer ECS Web:
WCF Data Services and Silverlight
Presentation transcript:

Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX

about John Liu Senior Consultant for SharePoint Gurus Sydney Blog johnliu.net Community: user groups, SharePoint Conferences and SharePoint Loves.NET - SharePoint 2007, 2010, Silverlight & Windows Phone Video games, board games, D&D

Contents Intro – jQuery – REST API (out of the box) Create SOAP service Create REST service Highly responsive websites with jQuery AJAX Create ADO.NET DataService Fast demo of Knockout JS

Intro - jQuery in 1 slide JavaScript library Select using CSS rules, then do something with the selected set Lots of helper functions, utilities Externally injected so doesnt interfere with how SharePoint works $("div.mybox").addClass("yourbox").show();

Intro - SharePoint REST API /_vti_bin/ListData.svc/

Quick tip with IE If you see this, IE is trying to be helpful Uncheck!

What are REST useful for? Within SharePoint - not much Incorrect - see John's KnockoutJS presentation - REST in 2010 ROCKS. With other applications - extremely useful Very simple interface that many 3 rd party apps know how to talk – Phone apps, JavaScript apps – Reporting apps, integration apps – SOAP is a lot more complex with creating the right SOAP envelop – REST is easy as long as you can make a web page request

Question before demo How many have written webparts for SharePoint How many have build your own WCF services at some point (for SharePoint) (new) How many of you have looked at MVC 4 – (bonus) What's the key feature of MVC 4?

WRITE YOUR OWN SOAP AND REST SERVICES Code Demo

Building your own WCF services Useful for InfoPath The problem with WCF: Error This collection already contains an address with scheme http Configuration necessary in web.config Use Microsoft.SharePoint.Client.Services.MultipleBaseAddressBasi cHttpBindingServiceHostFactory

What you can do in a REST service SPContext.Current Check current user's roles and permissions Make read and write database calls SPSecurity.RunWithElevatedPrivileges SPUtility.Send Do whatever you want! Use Microsoft.SharePoint.Client.Services.MultipleBaseAddressWe bServiceHostFactory Reminder: remember SPDisposeCheck

AJAXify your UI Define: AJAX – do it without refreshing the browser. This means a very seamless user experience Grab just the data I need from a quick service call Find where I want it to go Form HTML string and append() into the existing DOM structure

AJAX vs. Web Parts AJAX Script runs on client Need to learn jQuery AJAX Debug in browser Small payload Client side DOM manipulation Best Feature Super fast UI ASP.NET Web Parts ASP.NET hosted code Learn ASP.NET page lifecycle Debug in server Larger page size (waiting…) Connected web parts Configuring webparts is easier for non-developer

Deploy is simple Farm Solution But doesnt interfere with your site collections or deploy anything into SharePoint Stuffed up? Delete the service folder and it's gone! WebParts can be sandbox solutions – so if your service is stable, you only need to deploy/redeploy sandbox webparts to update your UI / script Your script can be stored in the library, can be modified without redeploy

Debug? Where!? Debug service on the server – Holds up App Pool - Debug webpart on the browser – Holds up only your own browser – IE9's dev tools are pretty good all round

WRITE YOUR OWN DATASERVICES, KNOCKOUTJS AND AJAX Bonus Demo

Future of jQuery, AJAX and REST jQuery data binding – jQuery.tmpl – jQote KnockoutJS – MVVM data-binding on client side

Summary Hands up if you think this is better than writing webparts :-) jQuery REST API (out of the box) Create SOAP service Create REST service Highly responsive websites with jQuery AJAX Create ADO.NET DataService

Resources REST and jQuery AJAX /calling-a-wcf-service-using-jquery-in-sharepoint.aspx jQuery-in-SharePoint-the-correct-way.aspx Data Service

Help! I'm still on jQuery wrapper around SharePoint 2007 (and 2010) SOAP services Notably, via JavaScript you can: – Update item without form – Start workflow on any item – Get information from user profile service

Gold Sponsors Bronze Sponsors Media Sponsors Silver Sponsors

Gold Sponsors Bronze Sponsors Media Sponsors Silver Sponsors

@johnnliu Thank you