building solutions with the sharepoint framework - deep-dive

15
Waldek Mastykarz Mikael Svenson

Upload: waldek-mastykarz

Post on 24-Jan-2017

642 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Building solutions with the SharePoint Framework - deep-dive

Waldek Mastykarz

Mikael Svenson

Page 2: Building solutions with the SharePoint Framework - deep-dive

Thanks to our sponsors

Platinum

Gold

Silver

SharePint

Page 3: Building solutions with the SharePoint Framework - deep-dive

Demo – Packaging

Page 4: Building solutions with the SharePoint Framework - deep-dive

Don’t bundle frameworks. Load from URL insteadconfig/config.json

{externals: {"angular": {"path": "https://cdn.com/…/angular.min.js","globalName": "angular"}}

}

Page 5: Building solutions with the SharePoint Framework - deep-dive

Different way to reference the framework based on its format• Module format (AMD, UMD, etc.)• URL only

• Non-module format• URL + globalName• optional globalDependencies

Page 6: Building solutions with the SharePoint Framework - deep-dive

Don’t guess script formathttp://rc-scripttype.azurewebsites.net/

Page 7: Building solutions with the SharePoint Framework - deep-dive

Known where you’re running• Get from this.context.environment.type• Possible values:• EnvironmentType.Test – tests context• EnvironmentType.Local – SharePoint workbench• EnvironmentType.SharePoint – Modern SharePoint page• EnvironmentType.ClassicSharePoint – Classic SharePoint page

Page 8: Building solutions with the SharePoint Framework - deep-dive

Validate web part properties values• Synchronous• Valid value: return empty string• Invalid value: return error message

• Asynchronous (using Promises)• Valid value: resolve promise with empty string• Invalid value: resolve promise with the error message• Do not reject the promise!

Page 9: Building solutions with the SharePoint Framework - deep-dive

Pre-configure web part for easy use• Configuration set provided through preconfiguredEntries• Different title, description and web part properties value

Page 10: Building solutions with the SharePoint Framework - deep-dive

Consider search• Use the searchablePropertyNames property to expose web

part configuration to SharePoint search

Page 11: Building solutions with the SharePoint Framework - deep-dive

Demo – Excel web part

Page 12: Building solutions with the SharePoint Framework - deep-dive

Web part configuration• Standard through web part property pane• Easy to implement• Familiar to users

• Custom through the web part surface• More complex to implement• Gives developers more freedom

Page 13: Building solutions with the SharePoint Framework - deep-dive

Demo – SP|CAF

Page 14: Building solutions with the SharePoint Framework - deep-dive

Analyze SharePoint Framework projects with SPCAF• Catch errors and fix easily using the provided guidance• For developers• Code analysis• Best practices

• For administrators• Solution inventory• Security assessment

• Available soon (visit spcaf.com for more information)

Page 15: Building solutions with the SharePoint Framework - deep-dive

Get in touch!@waldekm

blog.mastykarz.nl

@mikaelsvenson

techmikael.com