Building solutions with the SharePoint Framework - deep-dive
-
Upload
waldek-mastykarz -
Category
Technology
-
view
642 -
download
0
Transcript of Building solutions with the SharePoint Framework - deep-dive
Waldek Mastykarz
Mikael Svenson
Thanks to our sponsors
Platinum
Gold
Silver
SharePint
Demo – Packaging
Don’t bundle frameworks. Load from URL insteadconfig/config.json
{externals: {"angular": {"path": "https://cdn.com/…/angular.min.js","globalName": "angular"}}
}
Different way to reference the framework based on its format• Module format (AMD, UMD, etc.)• URL only
• Non-module format• URL + globalName• optional globalDependencies
Don’t guess script formathttp://rc-scripttype.azurewebsites.net/
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
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!
Pre-configure web part for easy use• Configuration set provided through preconfiguredEntries• Different title, description and web part properties value
Consider search• Use the searchablePropertyNames property to expose web
part configuration to SharePoint search
Demo – Excel web part
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
Demo – SP|CAF
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)
Get in touch!@waldekm
blog.mastykarz.nl
@mikaelsvenson
techmikael.com