Developing and Debugging Apps for SharePoint with Visual Studio ...

33

Transcript of Developing and Debugging Apps for SharePoint with Visual Studio ...

Page 1: Developing and Debugging Apps for SharePoint with Visual Studio ...
Page 2: Developing and Debugging Apps for SharePoint with Visual Studio ...

Developing and Debugging Apps for SharePoint with Visual Studio 2013 Sean LabereeProgram Manager LeadMicrosoft - Developer Division

SPC261

Page 3: Developing and Debugging Apps for SharePoint with Visual Studio ...

Getting Started App Model, Tools & Environments Building your first app in Visual Studio 2013 Common App Artifacts

Provider-hosted apps Developing using MVC Remote Debugging

Continuous Integration Automated builds & publishing to the cloud

Agenda

Page 4: Developing and Debugging Apps for SharePoint with Visual Studio ...

Getting Started

Page 5: Developing and Debugging Apps for SharePoint with Visual Studio ...

Office 365 Platform Contextual Apps

Robust O365 API’s Flexible Tools Documents People | Groups

Mail Tasks

Calendars REST Web Services

Page 6: Developing and Debugging Apps for SharePoint with Visual Studio ...

New App Model

App ManifestWeb PageHTML/CSS/JS

App

Page 7: Developing and Debugging Apps for SharePoint with Visual Studio ...

Choosing a Hosting Option

SharePoint App Web

SharePoint Host Web

Client-side code

Your hosted siteSharePoint Host Web

Client-side & Server-side code

SharePoint-hosted Provider-hosted

Page 8: Developing and Debugging Apps for SharePoint with Visual Studio ...

Example App for SharePoint

Page 9: Developing and Debugging Apps for SharePoint with Visual Studio ...

Tools & Environments

Page 10: Developing and Debugging Apps for SharePoint with Visual Studio ...

Microsoft Office Developer ToolsVisual Studio 2013March 2014 Update:http://aka.ms/OfficeDevToolsForVS2013

FlexibilityLocal & Remote Development for appsSharePoint Server & Office 365

Page 11: Developing and Debugging Apps for SharePoint with Visual Studio ...

Images Include: Visual Studio 2013 SharePoint 2013 SQL Server 2012 Configuration Scripts for

SharePoint Development

Get Started Activate your Windows Azure

MSDN Benefit Login to

http://portal.windowsazure.com Use your credit to create a

development VM

SharePoint Development in Azure IaaS

Page 12: Developing and Debugging Apps for SharePoint with Visual Studio ...

Building your first app in Visual Studio 2013

Page 13: Developing and Debugging Apps for SharePoint with Visual Studio ...

App Artifacts

Page 14: Developing and Debugging Apps for SharePoint with Visual Studio ...

End-to-end toolingCreate Site & List WorkflowsRich Workflow DesignerInitiation Form & Custom Activity TemplatesInteractive Debugging

SharePoint Workflows

Page 15: Developing and Debugging Apps for SharePoint with Visual Studio ...

UI Command – Ribbon/Menu Action

Page 16: Developing and Debugging Apps for SharePoint with Visual Studio ...

App Part / Client Web Part

Page 17: Developing and Debugging Apps for SharePoint with Visual Studio ...

Creating an App Part

Sean Laberee

Page 18: Developing and Debugging Apps for SharePoint with Visual Studio ...

Provider-hosted Apps

Page 19: Developing and Debugging Apps for SharePoint with Visual Studio ...

Choosing a Hosting Option

SharePoint App Web

SharePoint Host Web

Client-side code

Your hosted siteSharePoint Host Web

Client-side & Server-side code

SharePoint-hosted Provider-hosted

Page 20: Developing and Debugging Apps for SharePoint with Visual Studio ...

Choose in new app wizardFirst page of the creation wizardSupport WebForms & MVC

Add event to appApp events and remote event receivers add a web project

“Appetize” any Web project

Creating a Provider-hosted app

Page 21: Developing and Debugging Apps for SharePoint with Visual Studio ...

Use OAuth for secure communicationsSharePoint & web application trust third party (ACS)

Trust developed using ClientId & ClientSecret

SharePoint & ACS know the ClientIdWeb application & ACS know the ClientSecret

Web to SharePoint Communication

Token FlowSharePoint acquires context token from ACS & passes it to web applicationWeb application validates context token with ACS & gets back an access tokenAccess token used to communicate with SP

Page 22: Developing and Debugging Apps for SharePoint with Visual Studio ...

Declarative artifacts are deployed to SharePoint

HTML/CSS/JS, Lists, Content Types, etc

Code runs on local machineIISExpress is used to host Web project (http://localhost:1234)LocalDB is used for SQL databaseConnection string updated in web.config from SQL projectWorkflows execute in a local Workflow Manager

No app registration requiredClientId & ClientSecret are generated for you

Debug (F5)

Page 23: Developing and Debugging Apps for SharePoint with Visual Studio ...

SOAP Calls from SharePoint to the Web Application

Firewalls block SharePoint from calling your local IIS ExpressVisual Studio requires Windows Azure Service Bus Credentials to bypass the firewall

Debugging Event Receivers & App Events

Page 24: Developing and Debugging Apps for SharePoint with Visual Studio ...

Debugging a Provider-hosted appSean Laberee

Page 25: Developing and Debugging Apps for SharePoint with Visual Studio ...

Continuous Integration

Page 26: Developing and Debugging Apps for SharePoint with Visual Studio ...

Key BenefitsConsistent, regular, repeatable buildsValidate quality in consistent environments through automated testing & deploymentBetter Team Collaboration

FlexibilityUse Team Foundation Server or Service for Source ControlUse Hosted TFS or Team Build for automated buildsDeploy to SharePoint Online, SharePoint Server 2013 on-premises or hosted in Azure IaaSSupport for Solutions & Apps

Continuous Integration

Page 27: Developing and Debugging Apps for SharePoint with Visual Studio ...

Continuous IntegrationSean Laberee

Page 28: Developing and Debugging Apps for SharePoint with Visual Studio ...

Sign-up: tfs.visualstudio.com

Check-in scripts from: officesharepointci.codeplex.com/

Use the scripts in your build process

Write tests & check-in!

Getting Started with CI

Page 29: Developing and Debugging Apps for SharePoint with Visual Studio ...

Getting Started with Apps DevelopmentDeveloping and Debugging Provider-hosted appsContinuous Integration with Office 365 & Windows Azure

Conclusion

Page 30: Developing and Debugging Apps for SharePoint with Visual Studio ...

Explore our new Preview APIs

In-depth articles on MSDNSubject to change; not for production use

Connect with the community

Speak your mind at OfficeSPDev.UserVoice.ComSolve your roadblocks on StackOverflow

[Office] and [SharePoint]

Build using our toolsUnleash your development skills with Office Dev Tools for Visual Studio 2013 and Office 365 API Tools for Visual Studio 2013

Calls to Action

Page 31: Developing and Debugging Apps for SharePoint with Visual Studio ...

Related Sessions SPC394

Developing Office 365 Cloud Business Apps Palazzo Ballroom M,N @ Tue 10:45AM Steve Lasker

SPC3994 What’s new for Workflow in SharePoint OnlinePalazzo Ballroom O,P @ Wed 10:45AM Tim McConnell

SPC273Application Lifecycle Management in Office and SharePoint Palazzo Ballroom I,J @ Thurs 9:00 AM Ayman El-Hattab, Eric Charran

SPC419 Developing Cloud-Hosted Apps with MVC5Palazzo Ballroom A-H @ Thurs 9:00 AM Bob German

Page 32: Developing and Debugging Apps for SharePoint with Visual Studio ...

MySPC Sponsored by

connect. reimagine. transform.

Evaluate sessionson MySPC using yourlaptop or mobile device:myspc.sharepointconference.com

Page 33: Developing and Debugging Apps for SharePoint with Visual Studio ...

© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.