sharepoint framework - matt jimison · a brief history of sharepoint development ... introduction...

49
SharePoint Framework Getting Started with SPFx.

Upload: vunhi

Post on 16-Apr-2018

238 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

SharePoint Framework

Getting Started with SPFx.

Page 2: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Introductions

Matt Jimison

[email protected] (mail)

@mjimison (twitter)

Director of Platform Solutions

Allegient, a DMI Company (7 yrs)

2

Page 3: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Agenda

A Brief History of SharePoint Development

Introduction to the SharePoint Framework

Setting up your Dev Environment

Hello Chicago Web Part

Development Tips

3

Page 4: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

A Brief History of SharePoint

Development

A Magical Adventure

Page 5: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

SharePoint as a Platform

Branding

APIs Processes Packaging & Deployment

User Experience Business Intelligence

Page 6: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

SharePoint as a Platform

Page 7: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

SharePoint as a Platform

Themes

Alternate CSS

Custom Master

Page

PowerPivot

Excel Services

Reporting

Services

PerformancePoint

CSOM & JSOM

Web Services

Server Side APIs

2010 Workflows

Declarative

Sandbox

OOTB Web Parts

InfoPath & SPD

Event Receivers

SSIS

.NET Sandbox

Full Trust

Solutions

On-Premises Only NewSP 2010

Page 8: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

SP 2013SharePoint as a Platform

Themes

Alternate CSS

Composed Looks

JS Injection

Custom Master

Page

Client Side

Rendering

Custom Actions

Add-in Parts

Power BI

PowerPivot

Excel Services

Reporting

Services

PerformancePoint

REST

CSOM & JSOM

Web Services

Server Side APIs

2013 Workflows

2010 Workflows

Remote Event

Receivers

PnP Provisioning

PnP Partner Pack

Add-ins

Declarative

Sandbox

OOTB Web Parts

InfoPath & SPD

ASP.NET 4.5

Integration

Event Receivers

SSIS

.NET Sandbox

Full Trust

Solutions

On-Premises Only New

Page 9: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

O365SharePoint as a Platform

Themes

Alternate CSS

Composed

Looks

JS Injection

Custom Master

Page

SPFx

Power Apps

Client Side

Rendering

Custom Actions

Add-in Parts

Power BI

PowerPivot

Excel Services

Reporting

Services

PerformancePoint

Microsoft Graph

REST

CSOM & JSOM

Web Services

Server Side APIs

Microsoft Flow

Webhooks

2013 Workflows

2010 Workflows

Remote Event

Receivers

SPFx Client Side

Solutions

PnP Provisioning

PnP Partner Pack

Add-ins

Declarative

Sandbox

OOTB Web Parts

InfoPath & SPD

ASP.NET 4.5

Integration

Event Receivers

SSIS

.NET Sandbox

Full Trust

Solutions

On-Premises Only New

SPFx Extensions

Page 10: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

SharePoint as a Platform

Themes

Alternate CSS

Composed

Looks

JS Injection

Custom Master

Page

SPFx

Power Apps

Client Side

Rendering

Custom Actions

Add-in Parts

Power BI

PowerPivot

Excel Services

Reporting

Services

PerformancePoint

Microsoft Graph

REST

CSOM & JSOM

Web Services

Server Side APIs

Microsoft Flow

Webhooks

2013 Workflows

2010 Workflows

Remote Event

Receivers

SPFx Client Side

Solutions

PnP Provisioning

PnP Partner Pack

Add-ins

Declarative

Sandbox

OOTB Web Parts

InfoPath & SPD

ASP.NET 4.5

Integration

Event Receivers

SSIS

.NET Sandbox

Full Trust

Solutions

On-Premises Only New

SPFx Extensions

Not Recommended

Page 11: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Introduction to the SharePoint

Framework (SPFx)

SharePoint development meets open source standards.

Page 12: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

SharePoint Framework

(SPFx)

Page 13: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint
Page 14: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint
Page 15: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint
Page 16: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

But wait… There’s more.

Hot off the press.

Page 17: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

17

Page 18: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

18

Page 19: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

SharePoint Framework

Considerations

Before you begin.

Page 20: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Governance

Strive for a simple (1-2 pages) document that outlines the following

20

For Customers For Developers

Standardize Client-side libraries Development practices

External scripts policy Testing approach

Hosting location Deployment to production

Explicit agreements with ISVs Updates and support

Page 21: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Introduction to the SPFx Toolset

New Nouns for a New World

Page 22: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint
Page 23: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

IIS Express

Project

Templates

https://dev.office.com/sharepoint/docs/spfx/tools-and-libraries

Page 24: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint
Page 25: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint
Page 26: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint
Page 27: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint
Page 28: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint
Page 29: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Setting Up your Dev Environment

Next. Next. Finish. (Sorta)

Page 30: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Installing NodeJS LTS

Install NodeJS LTS

If already installed, check version with:

node –v

(rerun installer if you don’t have latest version, or use the Node Version Manager)

If using a Mac, use homebrew to install and manage

Ensure NPM is up to date

npm install -g npm

Get Node

https://nodejs.org/en/

Homebrew (Macs Only)

http://brew.sh/

https://dev.office.com/sharepoint/docs/spfx/set-up-your-development-environment

Page 31: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Installing Yeoman and Gulp

Install Yeoman and Gulp

npm install -g yo gulp .

Install Yeoman SharePoint Generator

npm install -g

@microsoft/generator-

sharepoint .

Yeoman Site

http://yeoman.io/

Gulp Site

http://gulpjs.com/

https://dev.office.com/sharepoint/docs/spfx/set-up-your-development-environment

Page 32: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Installing VS Code

Download and Install VS Code

You can also use

Atom

Webstorm Get VS Code

https://code.visualstudio.com

https://dev.office.com/sharepoint/docs/spfx/set-up-your-development-environment

Page 33: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Creating Your First Project

https://dev.office.com/sharepoint/docs/spfx/set-up-your-development-environment

Create Directory

md hello-chicago. Change Directory

cd hello-chicago. Install Dev Certificate

gulp trust-dev-cert. Scaffold Project

yo @Microsoft/sharepoint. Run Solution

gulp serve.

Page 34: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Demo

Hello World.

34

Page 35: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Development Tips

Tips for coding.

35

Page 36: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Debugging with Chrome

Install Google Chrome

Install ‘Debugger for Chrome’ extension in VS Code and reload

Create New Debugging Configuration(s)

Local Workbench

Hosted Workbench

Serve the solution without browser

gulp serve --nobrowser.

Debug with F5 (or Debug -> Start Debugging)

36https://dev.office.com/sharepoint/docs/spfx/debug-in-vscode

Page 37: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Demo

Tips and Tricks.

37

Page 38: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Intellisense with Config Files

Settings.json

Json.Schema

38https://blog.mastykarz.nl/edit-sharepoint-framework-project-configuration-visual-studio-code-intellisense/

Page 39: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Demo

Tips and Tricks.

39

Page 40: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Referencing Assets within Solution

Ensuring assets are referenced correctly after webpack:

require('set-webpack-public-path!');

Referencing assets within the solution:

<img src={String(require(‘/relative-to-component/link.jpg'))} alt='Link' />

40

Page 41: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Demo

Tips and Tricks.

41

Page 42: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Reading SharePoint Data

JSOM

REST

SPHttpClient

PnP JS Core

42

Page 43: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Demo

Tips and Tricks.

43

Page 44: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Creating Declarative Lists and Content Types

What can you create?

Fields / Site Columns

Content Types

List Instances

List Instances with Custom Schema

44https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/provision-sp-assets-from-package

Page 45: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Demo

Tips and Tricks.

45

Page 46: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Additional Resources

Overview of the SharePoint Framework

https://dev.office.com/sharepoint/docs/spfx/sharepoint-framework-overview

SharePoint Framework Roadmap

https://dev.office.com/sharepoint/docs/spfx/roadmap

Office Dev Patterns and Practices (PnP)

https://dev.office.com/patterns-and-practices

SharePoint Framework Code Samples (PnP)

https://dev.office.com/code-samples#?filters=sharepoint%20framework%20app

SharePoint Framework Reference

https://dev.office.com/sharepoint/reference/spfx/sharepoint-framework-reference-overview

PnP JS Core

https://github.com/SharePoint/PnP-JS-Core

Page 47: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Questions

47

Page 48: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Thank you

for attending!

Feel free to stop by afterwards for more questions.

Page 49: SharePoint Framework - Matt Jimison · A Brief History of SharePoint Development ... Introduction to the SharePoint Framework (SPFx) SharePoint development meets open ... yo @Microsoft/sharepoint

Sponsors