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

Post on 11-Feb-2017

242 views 2 download

Transcript of 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

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

Getting Started

Office 365 Platform Contextual Apps

Robust O365 API’s Flexible Tools Documents People | Groups

Mail Tasks

Calendars REST Web Services

New App Model

App ManifestWeb PageHTML/CSS/JS

App

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

Example App for SharePoint

Tools & Environments

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

FlexibilityLocal & Remote Development for appsSharePoint Server & Office 365

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

Building your first app in Visual Studio 2013

App Artifacts

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

SharePoint Workflows

UI Command – Ribbon/Menu Action

App Part / Client Web Part

Creating an App Part

Sean Laberee

Provider-hosted Apps

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

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

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

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)

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

Debugging a Provider-hosted appSean Laberee

Continuous Integration

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

Continuous IntegrationSean Laberee

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

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

Conclusion

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

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

MySPC Sponsored by

connect. reimagine. transform.

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

© 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.