180 likes | 489 Views
Building apps for Office and SharePoint 2013, Part 2 ( using the web technologies you know and love). Keenan Newton 3-021. Agenda. App Hosting Options. REST & CSOM APIs. Hosting: Choice of Three Architecture Approaches. Provider-Hosted App “Bring your own server hosting infrastructure”.
E N D
Building apps for Office and SharePoint 2013, Part 2(using the web technologies you know and love) Keenan Newton 3-021
Agenda App Hosting Options REST & CSOM APIs
Hosting: Choice of Three Architecture Approaches Provider-Hosted App “Bring your own server hosting infrastructure” SharePoint Web Your Hosted Site Cloud-based Apps Get remote events from SharePoint Use CSOM/REST + OAuth to work with SP Autohosted App Windows Azure + SQL Azure provisioned invisibly as apps are installed SharePoint Web Azure Parent Web • SharePoint-Hosted App • Provision an isolated sub web on a parent web • Reuse web elements (lists, files, out-of-box web parts) • No server code allowed; use client JavaScript for logic, UX App Web (from WSP)
Agenda App Hosting Options REST & CSOM APIs
Changes from SharePoint 2010 to 2013 • The client.svc service extended with REST capabilities • client.svc now supports direct access from REST clients • client.svc accepts HTTP GET, PUT, POST requests • Implemented in accordance with OData protocol • CSOM Extended new APIs • New APIs for SharePoint Server functionality • New API for Windows Phone Applications
What’s covered in the new CSOM/REST APIs? Search Social Taxonomy Workflow Analytics Sharing Publishing eDiscovery IRM BCS And much, much more!
Changes by SKU • In SharePoint Foundation • No Significant Changes to CSOM apart from REST support • Primary investment is adding REST support to existing API • In SharePoint Server • New APIs have been added with CSOM and REST support
SharePoint 2013 Remote API _api is new alias for _vti_bin/client.svc Server Client CSOM REST OData JSON JavaScript Library Silverlight Library .Net CLR Library Custom Client Code
Why is REST Important? • Significant Industry Momentum • Simple and Easy to Use • Much easier to use than SOAP-based Web service • Higher productivity when using JavaScript and jQuery • Results can be returned in JSON and ATOM format • Test in a browser • Platform agnostic • Each query is submitted with a unique URL • Results can be cached by proxy servers
REST URLs in SharePoint 2013 • CSOM URLS can go through _api folder • Simplifies URLs that need to be built • Removes client.svc file name from URL • You can replace this URL • http://contososerver/_vti_bin/client.svc/web • With this URL • http://contososerver/_api/web
Mapping Objects to Resources • Example REST URLs targeting SharePoint sites • _api/web/lists • _api/web/lists/getByTitle('Announcements') • _api/web/getAvailableWebTemplates(lcid=1033)
Related Sessions • Tomorrow 3:30 PM – B92 Odyssey – Apps for Office and SharePoint Development… • Thursday 8:30 AM – B92 Odyssey – Building end-to-end apps on SharePoint… • Thursday 12:00 PM – B92 Stinger – Developing an App for SharePoint Autohosted…
Resources • http://Dev.office.com Please submit session evals on the Build Windows 8 App or at http://aka.ms/BuildSessions