• Save
Developing SharePoint 2013 apps with Visual Studio 2012 - Microsoft TechDays 2013 - Bram de Jager
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Developing SharePoint 2013 apps with Visual Studio 2012 - Microsoft TechDays 2013 - Bram de Jager

on

  • 3,424 views

The new SharePoint App Model provides different ways of building apps. As a developer you have to choose between development techniques, hosting options and more. This session discusses the ...

The new SharePoint App Model provides different ways of building apps. As a developer you have to choose between development techniques, hosting options and more. This session discusses the architecture, various types of apps, application identity and permissions, and how to build these different types of apps. The session contains demos covering building SharePoint-hosted apps, implementing SharePoint 2013 chrome control, setting the right permissions, and more with Visual Studio 2012.

Statistics

Views

Total Views
3,424
Views on SlideShare
3,411
Embed Views
13

Actions

Likes
1
Downloads
0
Comments
0

1 Embed 13

http://localhost 13

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
  • SandboxedSolutionsdeprecated statement: http://msdn.microsoft.com/en-us/library/jj163114.aspx (optioneel no-code sandboxedsolutions voorlopig wel ondersteund?)
  • Office Developer Tools RTM on Tue 4 March: http://blogs.msdn.com/b/somasegar/archive/2013/03/04/now-available-office-developer-tools-for-visual-studio-2012.aspx VS.NET development for both apps & solutions
  • Use when app is ready for…Testing by anther person or teamUpload to Store or App CatalogUse the packages from app.publish folder
  • Open Packaging Conventions (OPC): http://msdn.microsoft.com/en-us/magazine/cc163372.aspxStandard For Packaging Data, also used for Office Open XML.
  • Legacy of Frontpage…, finally gone
  • ACS = Access Control Service (Windows Azure Access Control Service)
  • SharePoint  ACS (sendsClientID)ACS  SharePoint (sendsContext Token)SharePoint  Web Application (sends Context Token)Web Application  ACS (sends Context Token and Client Secrettovalidate)ACS  Web Application (sends Access Token)Web Application  SharePoint (sends Access Token forcommunication)
  • Debugging Remote Event Receivers with Visual Studio (Provider-hosted apps)http://blogs.msdn.com/b/officeapps/archive/2013/01/03/debugging-remote-event-receivers-with-visual-studio.aspx
  • VSTO downside is distributionOffice users around the globe 1 billion (June 2010). Noteverybody has Office 2013, but it’sverylikelylots of themwillupcomingyears. VSTO: http://en.wikipedia.org/wiki/Visual_Studio_Tools_for_Office

Developing SharePoint 2013 apps with Visual Studio 2012 - Microsoft TechDays 2013 - Bram de Jager Presentation Transcript

  • 1. Developing SharePoint 2013Apps with Visual Studio 2012Bram de JagerSharePoint Architect @ MacawMicrosoft Certified Solution Master: SharePoint
  • 2. Agenda• Evolution• Apps for SharePoint• Visual Studio Tools• REST & CSOM APIs• Remote Event Receivers
  • 3. EVOLUTIONDeveloping SharePoint 2013 Apps with Visual Studio 2012
  • 4. Development Evolution Investment inPortals & content App discovery & management 2003 2007 2010 2013  Web Parts  LOB  Silverlight  Apps applications  CSOM  Client side  Custom limited experience server side  Sandbox  CSOM code  REST/oDat  WSP a deployment
  • 5. Customization Options Farm Sandbox SharePoint Apps  Full trust solutions  Hosted in isolated  New Apps model  Customizations to process  Deployed from  file system of  Limited server side corporate catalog or servers SharePoint API Office Store  Hosted in same access  Manage permission process as  No external service and licenses SharePoint calls specifically  Server side  Simple install and SharePoint API upgrade process access Deprecated in  Preferred option  Classic model from SharePoint 2007 2013
  • 6. App Development ScenariosDeployment Options Customization Options Development ToolsOn-Premise FarmInstallation Farm-Trust Solutions Web BrowserOffice 365 &SharePoint Online Sandboxed Solutions SharePoint Designer SharePoint-HostedHosted Installation app Visual Studio Provider-Hosted app Eclipse, etc Autohosted app
  • 7. APPS FORSHAREPOINTDeveloping SharePoint 2013 Apps with Visual Studio 2012
  • 8. App Shapes Full page Implement complete app experiences to satisfy business scenarios App Parts Create app parts that can interact with the SharePoint experience UI command extensions Add new commands to the ribbon and item menus
  • 9. Hosting Options Provider-hosted app SharePoint Provide your own hosting environment Host Web Your Hosted SiteCloud-hosted apps- Use server code- Receive SP events- Use OAuth to access Autohosted appSP SharePoint Windows Azure + SQL Azure provisioned Host Web Azure automatically as apps are installedSharePoint-Hosted app SharePointProvisions an isolated sub web on a host web- Use SP artifacts & out-of-box web parts Host Web- Use HTML & JavaScript for UI & client-side logic- Use Workflows for middle tier logic SharePoint App Web
  • 10. VISUAL STUDIOTOOLSDeveloping SharePoint 2013 Apps with Visual Studio 2012
  • 11. Visual Studio SharePointTools• Development Environments – Develop against a local SharePoint server – Remote development against SharePoint Online (Office 365)• Tools – Office Developer Tools (RTM) – Download http://dev.office.com
  • 12. Debug your app• No app registration required – SharePoint Developer Site – ClientId & ClientSecret are generated for you• IISExpress is used to host Web project – ~remoteAppUrl token update so it points to IISExpress Url (http://localhost:1234)• LocalDB is used for SQL database – Connection string updated in web.config from SQL project• Local workflow service is started & configured
  • 13. Publish your app• SharePoint-hosted & Autohosted – No app registration required – Everything included in the .app package• Provider-hosted – Developer must acquire ClientId & ClientSecret via Seller Dashboard – SharePoint artifacts in .app package – Web assets in Web Deploy package - developer must deploy • Developer must publish & deploy SQL assets if not in Web Deploy package
  • 14. Anatomy of an App Package Host Web.app Package App Web WS (OPC) P (from WSP) Azure
  • 15. demoBuilding your first app
  • 16. Demo Silly Facts• SharePoint-Hosted app – Look around • AppManifest.xml • SharePoint Artifacts – Silly Fact content type and Facts list – App Part (Client Web Part) – Custom Action (Host web)
  • 17. REST & CSOMDeveloping SharePoint 2013 Apps with Visual Studio 2012
  • 18. Changes from 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 – Focus investment on SharePoint Server APIs – Search, Social, Taxonomy, Workflow, Analytics, Sharing, Publishing, eDiscovery, IRM, BCS, … and more
  • 19. SharePoint 2013 Remote API _api is new alias for _vti_bin/client.svc Server Client REST CSOM OData JSON JavaScript Silverlight .Net CLR Library Library Library Custom Client Code
  • 20. 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
  • 21. REST URLs in SharePoint2013• 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://contoso.com/_vti_bin/client.svc/web• With this URL – http://contoso.com/_api/web
  • 22. Mapping Objects toResources• Example REST URLs targeting SharePoint – _api/web/lists – _api/web/lists/getByTitle(Announcements) – _api/web/getAvailableWebTemplates(lcid=1033)
  • 23. App Authentication• Use OAuth for secure communications – SharePoint & web application trust third party (ACS)• Trust developed using ClientId & ClientSecret – SharePoint & ACS know the ClientId – Web application & ACS know the ClientSecret
  • 24. Authentication, cont’d Access Control Service (ACS) ClientID ClientSecret SharePoint My Web  Access Token server Application Context Token 
  • 25. demoUsing CSOM andREST
  • 26. Demo CSOM and REST• Provider-Hosted app – Add web project – Chrome – Use CSOM and REST to create silly facts • User Profile (REST) • Search (REST) • Taxonomy (CSOM)
  • 27. REMOTE EVENTRECEIVERSDeveloping SharePoint 2013 Apps with Visual Studio 2012
  • 28. Remote Event Receivers• Where to use – Use RER to receive notification that a change has occurred – Use interface to poll SharePoint for changes – Write changes as required• Event scopes: List Item, List, Web, App• Support for the following types – Synchronous Events – Asynchronous After Events
  • 29. Remote Event ReceiversRegister declaratively or via code string url= "http://contoso.com/RemoteEventService.svc"; using (SPSite site = new SPSite(siteUrl)) { using (SPWeb web = site.RootWeb) { SPList list = web.Lists[listTitle]; list.EventReceivers.Add( SPEventReceiverType.ItemAdded, url); } }
  • 30. WRAP-UPDeveloping SharePoint 2013 Apps with Visual Studio 2012
  • 31. Summary• The way forward for customizations on SharePoint• Build for the cloud (Office 365)• Heavily invested in CSOM and REST, allowing interaction with SharePoint
  • 32. Try it yourselfOffice StoreOffice 365 playground http://dev.office.com
  • 33. Information• Download – Slides – Source code – http://bit.ly/XZTLbY• Contact – www.macaw.nl – Bram.de.Jager@macaw.nl – bramdejager.wordpress.com – @bramdejager