From Solutions to Apps - Moving to SP2013


Published on

SharePoint Saturday NH talk on moving from SharePoint 2010 solutions to SharePoint 2013 apps - by @Bob1German and @SPDCP

Published in: Technology, Design
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

From Solutions to Apps - Moving to SP2013

  1. 1. From Solutions to Apps Moving to SharePoint 2013Bob GermanDerek Cash-PetersonBlueMetal Architects @Bob1German • @SPDCP •
  2. 2. Agenda• Apps Model Overview• App Access to SharePoint – RESTful Access – Client Side Object Model (CSOM) – Cross-domain Access – OAuth Access• Other Topics @Bob1German • @SPDCP •
  3. 3. Apps 101 Host Web REST or Client OMLink orIFrame App @Bob1German • @SPDCP •
  4. 4. App Hosting OptionsHost HostWeb Web App App Web (optional) Web App Azure or other provider SharePoint Provider or Hosted App Auto-Hosted App @Bob1German • @SPDCP •
  5. 5. App Hosting OptionsApp Web Provider or Azure• Provisioned by SharePoint • Auto-hosted apps are on app installation provisioned by Office 365• No Server Code – period on app installation (though you can leverage • Pretty much installed ASP.NET controls) Host anything goes Web• May contain declarative, web-scoped • Access host web via Oauth App features (lists, site Web pages, client script, images, css) App• Access host web via cross- domain library @Bob1German • @SPDCP •
  6. 6. App IsolationHost http://myserver/sites/myweb/Web App Web http://app12345/sites/myweb/ (optional) App Azure or other provider Different domain names leverage browsers’ same-origin policy @Bob1German • @SPDCP •
  7. 7. Isolated Application shows: - Client Side Object Model - Declarative features in App Site - Simple Client Web Part (“App Part”)Chord CalculatorDEMONSTRATION @Bob1German • @SPDCP •
  8. 8. App Access to SharePoint @Bob1German • @SPDCP •
  9. 9. Choosing an App Model2010 Model 2013 Apps• Reuse and backward • App code is reusable in compatibility with existing SharePoint and Office solutions • Better isolation – no more• Full access to server OM leftover web parts and lists – Nearly complete access to • App-level AuthN from Azure everything in SharePoint or other provider – Well documented – • No dependency on User MSDN, many Code Service books, blogs, etc. • Leverages general web• Leverages SharePoint development skills development skills @Bob1German • @SPDCP •
  10. 10. Choosing an Access MethodREST CSOM• Synchronous or • Asynchronous only in asynchronous in Javascript Javascript• Returns entities (e.g. • Returns SharePoint objects Contact, Task) (e.g. List, ListItem)• Easier access from jQuery– • Easier access from .NET no dependency on SP.JS server side • Batched requests @Bob1German • @SPDCP •
  11. 11. Choosing a Hosting ModelSharePoint Hosted Provider / Azure Hosted• No server side code, period • Server-side code• Access to OOB SharePoint • Server is not subject to web controls on the page cross-domain policy• Able to store content on • More flexible data storage customer’s SP infrastructure (SQL Azure, etc.) @Bob1German • @SPDCP •
  12. 12. Accessing Data with Client OM OData (REST) @Bob1German • @SPDCP •
  13. 13. What’s New in CSOM So much more than simple site and list access!• User Profiles • Sharing• Search • Workflow• Taxonomy • E-Discovery• Feeds • IRM• Publishing • Analytics• Business Connectivity Services @Bob1German • @SPDCP •
  14. 14. Silverlight App w/Cross-Domain Policy• CSOM Cross-domain Access• CSOM File UploadWebcam DemoDEMONSTRATION @Bob1German • @SPDCP •
  15. 15. Representational State Transfer (REST) JSON ATOM JSON ATOM WPF/WinForm/Office Silverlight JavaScript @Bob1German • @SPDCP •
  16. 16. Representational State Transfer (REST)• Operations map to HTTP verbs – Retrieve items/lists  GET – Create new item  POST – Update an item  PUT or MERGE – Delete an item  DELETE – These apply to links (lookups) as well• SharePoint rules apply during updates – Validation, access control, etc. @Bob1German • @SPDCP •
  17. 17. URL Conventions• Addressing lists and items List of lists /_api/web/lists List /_api/web/lists(‘guid’) List /_api/web/lists/getbytitle(‘Title’) Items /_api/web/lists/getbytitle(listname)/items Item /_api/web/lists/getbytitle(listname)/items(1) Single column /_api/web/lists/getbytitle(listname)/items(1)/fields/getByTitle (Description) Sorting ?$orderby=Fullname Filtering $filter=JobTitle eq SDE Projection ?$select=Fullname,JobTitle Paging ?$top=10&$skip=30 @Bob1German • Inline expansion ?$expand=Project @SPDCP •
  18. 18. jQuery App with Cross-Domain LibraryImage RotatorDEMONSTRATION @Bob1German • @SPDCP •
  19. 19. Open Authentication• Standard in use by dozens of public sites• Similar to a valet key – App gives to a partly trusted 3rd party – Grants limited access• SharePoint grants the app access on the user’s behalf – No need to pass the user’s credentials – SharePoint can limit the scope of access @Bob1German • @SPDCP •
  20. 20. Azure-Hosted App with OAuthContacts MapDEMONSTRATION @Bob1German • @SPDCP •
  21. 21. Remote Event Receivers• Require a provider or Azure-hosted app• Uses Access Control Services (ACS) token – Passed from SharePoint to remote web service – Web service can request a token to send back to SharePoint• SharePoint calls a web service with the following methods: – ProcessEvent() – Synchronous – ProcessOneWayEvent() – Asynchronous• List, ListItem, Web, and App level scopes• App Events – call AppEventReceiver.svc – App Installed – App Uninstalling – App Upgraded• Caveats: – No guaranteed delivery – Watch latency and performance on synchronous events @Bob1German • @SPDCP •
  22. 22. Workflow @Bob1German • @SPDCP •
  23. 23. ResourcesSharePoint 2013 Development• Host webs, Web apps, and SharePoint Components:• Data Access Options for Apps in SharePoint 2013:• OAuth and SharePoint 2013:• SharePoint 2013 Workflows:• Programming using the SharePoint 2013 REST service:• Programming using the SP 2013 CSOM (JavaScript): Us• Bob German - @Bob1German• Derek Cash Peterson - @SPDCP @Bob1German • @SPDCP •
  24. 24. was made possible by the generous support of the following sponsors… @Bob1German • Thank you!And by@SPDCP • your participation…