are you in the right spot? - nellis consulting,...

46

Upload: others

Post on 20-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple
Page 2: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Are you in the right spot?

Page 3: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Julie TurnerPrincipal Architect

Professional developer since 1995

Working with SP since 2007

Blog: http://julieturner.net

LI: https://www.linkedin.com/in/juliemturner

Twitter: @jfj1997

Slide Share: http://www.slideshare.net/JulieTurner24

Page 4: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

What We’ve Covered

Page 5: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Part 2 Agenda

Page 6: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple
Page 7: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Why Do We Care?

Page 8: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

MVVM Pattern

Model-View-ViewModel (MVVM) pattern

See: https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel

Page 9: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Comparison of Approaches/ Frameworks

Page 10: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple
Page 11: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

What is KnockoutJS?

Source: http://knockoutjs.com/

Page 12: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

How is KnockoutJS Built?

Source: http://knockoutjs.com/documentation/introduction.html

Page 13: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Declarative Bindings

data-

data-bind text: TitleSource: http://knockoutjs.com/documentation/introduction.html

Page 14: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Dependency Tracking

Source: http://knockoutjs.com/documentation/computed-dependency-tracking.html

Page 15: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

"Trivially Extensible"

data-bind myCustomBinding: Title

ko.bindingHandlers.myCustomBinding = {init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {

// This will be called when the binding is first applied to an element// Set up any initial state, event handlers, etc. here

},update: function(element, valueAccessor, allBindings, viewModel, bindingContext) {

// This will be called once when the binding is first applied to an element,// and again whenever any observables/computeds that are accessed change// Update the DOM element based on the supplied values here.

}};

Source: http://knockoutjs.com/documentation/custom-bindings.html

Page 16: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Parameters Available to Custom Bindings

Source: http://knockoutjs.com/documentation/custom-bindings.html

Page 17: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple
Page 18: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

AngularJS – 1.x (not discussing Angular 2)

Page 19: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

The Basics<html ng-app>

<head>

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>

<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.0.4/css/bootstrap-combined.min.css">

</head>

<body>

<div>

<label>Name:</label>

<input type="text" ng-model="yourName" placeholder="Enter a name here">

<hr>

<h1>Hello {{yourName}}!</h1>

</div>

</body>

</html>

Page 20: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple
Page 21: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Embed it in SharePoint<!-- Dependencies -->

<!-- Script to make the call -->

<!-- Display UI -->

Page 22: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Create a Module/Controller

Page 23: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Bind the HTML

Page 24: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

https://docs.angularjs.org/guide/scope

Hints & Gotchas

Page 25: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Choose a Framework

Page 26: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple
Page 27: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Source Control and Code Management

Sympraxis’ SharePoint Client Side Development Pipeline

spsave

Code Editor

Page 28: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Source Control and Code Management: gulpfile

Sympraxis’ SharePoint Client Side Development Pipeline

Page 29: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Widgets in one Site

Collection

Widget in one

tenant/farm, multiple

site collections

Widgets used across

multiple

tenants/farms*

Store code in a library in a specific

subsite X X

Store code in a library in the root

site of the Site Collection X

Store code in a Site Collection

specifically for client side codeO O

Create an actual CDN (Azure, AWS,

dedicated server, other commercial

CDN provider…)**X O

- Good solution O – Optional solution, potentially overkill X – Not a great choice

* - Not referencing any code that would be part of a commercial solution.

** - CDNs or Content Delivery Networks allow “content” to be made highly available to end users everywhere.

Code Creep - SharePoint "CDN" by Julie Turner (@jfj1997)

Where Should I Put My Stuff?

If you store your code in a different Site Collection or CDN, you may

need to bootstrap it into place.

Page 30: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple
Page 31: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Widget Wrangler Sample

Page 32: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Versioning

Page 33: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple
Page 34: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Overview

Page 35: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

So What's Changed?

Page 36: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

What Is the SharePoint Framework?

Page 37: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

IIS Express

Project Templates

Server Side Tool Comparison

Page 38: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

SharePoint Workbench

Page 39: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

"Modern" SharePoint Page

Page 40: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple
Page 41: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Strategy: JavaScript Charting Libraries

Page 42: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Being Manipulative Is Key

Structured List(s)

Selected Data

Chart

Page 43: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Being Manipulative Is Key

Structured List(s)

Selected Data

Chart

Selected Data [{}]

ID

Business Unit

Category

Status

Due Date

Assigned To

Page 44: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple

Being Manipulative Is Key

Structured List(s)

Selected Data

Chart

Selected Data [{}]

ID

Business Unit

Category

Status

Due Date

Assigned To

Chart[{}]

Categories [‘strings’]

Values [{}]

Assigned To

Item Count

Page 45: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple
Page 46: Are you in the right spot? - Nellis Consulting, LLCnellisconsultingllc.com/Resources/SPTechConSF2016Slides/Dec 5... · Widgets in one Site Collection Widget in one tenant/farm, multiple