• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
SharePoint 2013 APIs demystified
 

SharePoint 2013 APIs demystified

on

  • 1,854 views

This sessions if for everybody that always wanted to know about SharePoint development, but didn’t have anyone to ask, or didn’t have opportunity to try on their own. We’ll show how to start ...

This sessions if for everybody that always wanted to know about SharePoint development, but didn’t have anyone to ask, or didn’t have opportunity to try on their own. We’ll show how to start with SharePoint development, what API to use, when to use client API, is server side object model deprecated, how to setup development environment and more tips & tricks which are not usually mentioned.

Statistics

Views

Total Views
1,854
Views on SlideShare
1,854
Embed Views
0

Actions

Likes
1
Downloads
101
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    SharePoint 2013 APIs demystified SharePoint 2013 APIs demystified Presentation Transcript

    • SharePoint 2013 APIs demystified JOŠKO IVANKOV, EVISION SHAREPOINT AND PROJECT CONFERENCE ADRIATICS 2013 ZAGREB, NOVEMBER 27-28 2013
    • sponsors
    • Agenda • About SharePoint • SharePoint APIs history • SharePoint 2013 API overview • What API to choose • SharePoint Apps overview • SharePoint Dev environment • Key Takeaways • Q&A
    • What is SharePoint? • It’s web & intranet platform for… • • • • • • • Collaboration Enterprise Content Management Search Business Process Management (Workflows) Business Intelligence Social Computing Enterprise Application Integration • More than 50% of intranets in the world use SharePoint!!!
    • Why SharePoint? • Worldwide used product and platform • Leading platform for ECM, BPM, BI and Social Computing • On premise and Cloud ready • Standardized and widely accepted functionalities • Lot’s of Out-Of-The-Box features and platform for creating your own applications
    • What is SharePoint Development? End user Power user • SharePoint Configuration • Internet Explorer • XML, XSL, JavaScript, jQuery, UI Config • SharePoint designer Designer • Master Page, Page layout, CSS • SharePoint designer Developer • SSOM, CSOM, .NET, JS, REST • Visual Studio
    • One day in life of SharePoint developer • Server side OM • Client side OM • JavaScript • Rest • WCF (SOAP, OData) • HTML, CSS • XML, XSLT • jQuery • TypeScript • Oauth • NTLM, Kerberos • FBA authentication • Claims • InfoPath forms • Azure ACS • AppFabric Cache • Windows RT • Windows Phone • Workflow Foundation • Silverlight
    • Development overview Client Side • Client Object Model • REST Services Data Platform • • • • Farm Sites List data External lists Server side • Server Side Object Model
    • APIs – History: SharePoint 2007 • Server-side object model • RPC Calls (owssrc.dll) • ASMX Web Services (The only client side possibility) • SPServices (Community Project based on ASMX services)
    • APIs – History: SharePoint 2010 • Server Side object model • RPC Calls (owssrc.dll) • ASMX Web Services • SPServices (Community Project based on ASMX services) • ListData.svc (REST-like web service) • Client Side Object Model
    • APIs – SharePoint 2013 • Server Side Object Model • RPC Calls (owssrc.dll) • ASMX Web Services • Client-Side Object Model (extended) • New REST APIs
    • Sever object model • Largest API set • Cover all functionalities of SharePoint – both end user and administrative • Microsoft.SharePoint… namespace • Assemblies are deployed to GAC • On premises use only • Sandboxed solutions are deprecated in favor of Apps for SharePoint
    • Sever object model - example
    • Server object model – remember • Code that use SharePoint data platform (SPSite, SPWeb, SPList, SPListItem, SPFile …) should be on SharePoint server with Front End role • Use WSP – easier to deploy and maintain • Check disposing of SharePoint objects • Use it for Web Parts, Layout pages, Timer jobs, EventReceivers, custom WCF/ASMX on SharePoint server, • On premises only!!!
    • SharePoint 2013 Remote API Architecture
    • Client object model for managed code • .NET client object model • .NET application that run on a non-phone Windows client • user computer • external server • web or worker role on Windows Azure • Core classes in SSOM have corresponding classes in CSOM • SPSite -> Site • SPWeb -> Web • SPList -> List • Support for ECM, taxonomy, user profiles, publishing, search, BCS… • Lines of code are sent to the server in batches (to improve performance) • Install SharePoint client components • Namespace Microsoft.SharePoint.Client
    • Client object model for managed code • Silverlight client object model • Used in Silverlight applications regardless where the compiled .xap file is persisted • • • • Assets library on SharePoint 2013 site Client computer Cloud storage External server • Nearly identical to .NET Client object model • Difference: in Silverlight version all batches of commands are sent to the server asynchronously -> UI of the application remains active • Silverlight .xap files can be included in Apps for SharePoint
    • Client object model for managed code • Mobile object model • Special version of the Silverlight client object model for Windows Phone devices • Additional API – relevant only to telephones (push notifications…) • Supports only core SharePoint functionalities • Support for ECM, taxonomy, user profiles, publishing, search, BCS…
    • JavaScript object model • Inline script or separate .js files • Includes all the same functionality as the .NET Framework and Silverlight client object models • Batches of code always run asynchronously • Data is returned from the server in JavaScript Object Notation (JSON)
    • Client Object Model Mechanics
    • Changes to CSOM in SharePoint 2013
    • CSOM using Managed Code
    • CSOM using JavaScript
    • REST/OData endpoints • Access SharePoint entities from client technology that do not use JavaScript and are not built on the .NET Framework or Silverlight platforms • CRUD operations on SharePoint list data using OData protocol • Response: Atom or JSON format
    • REST mechanics
    • REST URLs in SharePoint 2013
    • Mapping Objects to Resources
    • Testing REST Calls Through the Browser
    • Returning ATOM XML vs. JSON
    • REST Query from Managed Code
    • REST Query Using JavaScript & jQuery
    • Factors that determine which API to use • The type of application • SharePoint App, Web Part, Silverlight application, timer job… • Your existing skill • JavaScript, ASP.NET, REST/OData, Silverlight, Windows Phone… • The device on which the code runs • Server in the SharePoint farm, external server, a client computer, mobile device…
    • What API to use?
    • If you want to do this • Create an ASP.NET web application that performs create/read/update/deleted (CRUD) operations across a firewall on SharePoint data or external data that is surfaced in SharePoint by a Microsoft Business Connectivity Services (BCS) external content type …use these APIs • JavaScript client object model
    • If you want to do this • Create an ASP.NET web application that performs CRUD operations on SharePoint data or external data that is surfaced in SharePoint by a BCS external content type, but does not have to call SharePoint across a firewall …use these APIs • .NET Framework client object model, Silverlight client object model, or REST/OData endpoints
    • If you want to do this • Create a LAMP web application that performs CRUD operations on SharePoint data or external data that is surfaced in SharePoint by a BCS external content type …use these APIs • REST/OData endpoints
    • If you want to do this • Create a Windows Phone app that performs CRUD operations on SharePoint data …use these APIs • Mobile client object model
    • If you want to do this • Create an iOS or Android app that performs CRUD operations on SharePoint data …use these APIs • REST/OData endpoints
    • If you want to do this • Create a .NET Framework application that performs CRUD operations on SharePoint data …use these APIs • .NET Framework client object model
    • If you want to do this • Create a Silverlight application that performs CRUD operations on SharePoint data …use these APIs • Silverlight client object model
    • If you want to do this • Create an HTML/JavaScript application that performs CRUD operations on SharePoint data …use these APIs • JavaScript client object model
    • If you want to do this • Create an app for Office that works with SharePoint …use these APIs • JavaScript client object model
    • If you want to do this • Create a custom Windows PowerShell command …use these APIs • Server object model
    • If you want to do this • Create a timer job …use these APIs • Server object model
    • If you want to do this • Create a custom Web Part, application page, or ASP.NET user control …use these APIs • Server object model
    • What to chose? SharePoint extensions SharePoint Data models Web parts Farm Solutions Application Pages Event Handlers SharePoint Business customizatio ns Connectivity Services Service Applications Timer Jobs Admin stuff SharePoint Server Side Object Model ...
    • What to chose? Admin stuff PowerShell Communicate with SharePoint from outer world Client Object Model SharePoint Server Side Object Model REST API
    • What to chose? .net Applications Silverlight Applications Windows Phone applications JavaScript (in SharePoint pages) SharePoint Apps Office Apps iOS, Android * CLR PowerShell SL WP ECMA Client Object Model SharePoint Server Side Object Model * REST API
    • SharePoint solution types with SP 2013 1 2 Farm solutions 3 Sandbox SP Apps Full trust solutions Declarative elements New Apps model Customizations to file system of servers Partially trusted code service still included for limited server side support Deployed from corporate catalog or office market place Classic model from 2007 Manage permission and licenses specifically Preferred option
    • apps… • …are not executed in SharePoint App pool • …are in most of the cases not even running on SP Server • …can have full trust, with user’s approval (OAuth) • …can access SharePoint Data • …can access outer world non-SharePoint Data • …can use any external resources • …can be executed in it’s own chrome, as app parts, or as SharePoint extensions
    • why apps • Isolated (safe!) • Multi-tenant • Multiple development possibilities (even non-MS stack) • Easier to deploy • Easier to maintain (lifecycle – versioning, upgrades) • Manageable (SharePoint Marketplace, Corporate Catalog) • Cloud ready!
    • SP App design - a choice of three approaches Provider-Hosted App Cloud-based Apps “Bring your own server hosting infrastructure” Developers will need to isolate tenants Get remote events from SharePoint Use CSOM/REST + OAuth to work with SP SharePoint Web Your Hosted Site SharePoint Web Azure (from WebDeploy, DacPac) Azure Auto-Hosted App Windows Azure + SQL Azure provisioned invisibly as apps are installed 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 Parent Web App Web (from WSP)
    • Types of Apps for SharePoint Shape Description Example Immersive App (Full Page) App that implements a new scenario for customers Resource Tracking, Budgeting App Part Provides new parts you can add to your sites Weather, Team Mascot, News Extension App (Custom Action) Add new actions for documents and items Display Document Visualization, Print to Print Service Vendor
    • Development environment for SharePoint 2013 • Create solutions with server side object model or develop apps for SharePoint for a corporate catalog (full control permission) • VM • • • • Windows Server 2008 R2(SP1)/2012 SQL Server 2008 R2/2012 (Express/Standard/Enterprise) SharePoint 2013 Foundation/Standard/Enterprise Visual Studio 2012, SharePoint Designer 2013, Office 2013 • Create and publish apps for SharePoint • Get Office365 Developer site • NAPA / Visual Studio 2012
    • Key Takeaways • SharePoint is leading IWS solution • SharePoint development is complex but worthy • Invest time in choosing right technology and approach for SharePoint development • SharePoint Apps – be prepared for new trend • SaaS, Cloud – dominate trends in future
    • questions? JOSKO.IVANKOV@EVISION.HR @JOSKOI
    • thank you. SHAREPOINT AND PROJECT CONFERENCE ADRIATICS 2013 ZAGREB, NOVEMBER 27-28 2013