34
SharePoint Framework, React, Office UI Fabric SONJA MADSEN SONJASAPPS

SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

Embed Size (px)

Citation preview

Page 1: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

SharePoint Framework, React, Office UI Fabric

SONJA MADSENSONJASAPPS

Page 2: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

SPONSORS

Page 3: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

SharePoint Framework CLIENT-SIDE WEB PARTS

LIST-BASED AND PAGE-BASED APPLICATIONSWEBHOOKS

Page 4: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

Sonja Madsen MICROSOFT MVP, SONJASAPPSBEST INTERNATIONAL DEVELOPER

Page 5: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

SharePoint Framework, React, Office UI Fabric

Bigger, better, faster

Page 6: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

Office UI Fabric

• dev.office.com/fabric/styles• Fonts, colors• Grid• Icons• Controls

Page 7: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

The Grid

Page 8: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

DEMO OFFICE UI FABRIC

Page 9: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

• SharePoint on-premise

• Office 365

Page 10: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

No isolated app web

No app domain

Page 11: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

Development• Visual Studio Code, Visual Studio• TypeScript• React is a suggested framework• Office UI Fabric

Page 12: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

Development

&

Visual Studio CodeVisual Studio

& WORKBENCH

Page 13: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

Workbench

Page 14: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

DEMO WEB PART AND THE WORKBENCH

Page 15: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

What’s new• TypeScript –> JavaScript• LESS -> CSS• .spapp package• Hosting of js and other files• No cross-domain• No .aspx page with HTML

Page 16: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

Why TypeScriptcontext = new SP.ClientContext.get_current();

var context

var context

var context

var context

Page 17: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

JavaScript Patternsfunction getImages() { context = new SP.ClientContext.get_current(); var request = new SP.WebRequestInfo(); var url = rssurl; var account = getProperty("Account");}

var myApp = (function () { var getImages = function () { context = new SP.ClientContext.get_current(); var request = new SP.WebRequestInfo(); var url = rssurl; var account = getProperty("Account");};

Page 18: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

.spapp SharePoint App Catalog

Page 19: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

.spapp package

No .wsp, no .js, no .css, no images

Page 20: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

Microsoft Azure CDN point of presence (POP) locations

Page 21: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

.js file on CDN

.js file in Style Library

.js file in the Scripts folder

.js file in Style Library

Page 22: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

Hosting on a CDN or remote server• Updates and versioning• Price• IP: Anonymous access to .js and .css files that are no

longer within the app• CDN hosting and security: files that have access to your

data• Reference my .js files - highjack functionality and design

Page 23: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

Reactjs• React is front end library developed by Facebook• Used for handling view layer for web and mobile apps• JSX − JSX is JavaScript syntax extension• Components − everything is a component• Unidirectional data flow and Flux − React

implements one way data flow• Virtual DOM which is JavaScript object• Inline templating and JSX

Page 24: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

DEMO REACT

Page 25: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

List-based applications

A list with custom list form pages

Main page

Any other page

New item, Edit item, Display item

Page 26: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016
Page 27: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

DEMO LIST-BASED APPLICATION

Page 28: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

Page-based applications

Site Pages Library Pages

Page 29: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

DEMO PAGE-BASED APPLICATION

Page 30: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

Webhooks• List item receivers• Add item, delete item, check-out, check-in

Page 31: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

SharePoint Add-ins - Advantages• You can hide the lists from end-user• Both pages and an app part• .aspx page – HTML• Images, scripts, stylesheets hosted on SharePoint• Isolated is not always a bad thing

Page 32: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

SharePoint Framework - Advantages• Responsive mobile friendly• No iframe• Dynamic properties• Webhooks• List-based and Page-based• No need for cross-domain library to access SharePoint

resources

Page 33: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

@SONJAMADSEN SP2013.BLOGSPOT.COM [email protected]

Page 34: SharePoint Framework, React, and Office UI Fabric spc adriatics 2016

thank youquestions?

live ratingsSP2013.BLOGSPOT.COMSONJAMADSEN

spca.biz/NKLM