This is a live walkthrough where we convert a common full trust solution to a SharePoint Framework solution. May the demo Gods be kind to me. Really, we will do it. Does not cover all possible scenarios, but I will show you the general workflow for converting your full trust solutions to SPFx solutions. I show you the proper configuration for your development environment. We walk through building the SPFx solutions and deploying it to Office 365. Lots of DO’s and DON’Ts will be shared. I’ll show you some of my scars too. From this session forward, you will want to hone your skills in modern SharePoint and convert everything to SPFx solutions.
Attendee Takeaways:
1. Understand the why, the how, and what make up the SharePoint Framework (SPFx).
2. A live demonstration where we take a common Full Trust Solutions and covert it to the SharePoint Framework (SPFx) in less than 1 hour.
3. I share lots of tips, DO’s and DON’Ts to save you hours and days of your life. Yes, you are welcome :)
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
1. Learn to convert your Full Trust Solutions to the
SharePoint Framework (SPFx) in 1 hour
Brian Culver ● #SPSSD ● January 13, 2018
2. Thank You to Our Sponsors
PLATINUM
GOLD
SILVER BRONZE
3. About Brian Culver
SharePoint Solutions Architect for Expert Point Solutions in
Houston, Texas.
Microsoft Certified Master (MCM) in SharePoint
Brian has worked in the Information Technology industry for
since 1998 and he has been working with SharePoint since
2005. His deep expertise includes Azure, Office365,
SharePoint, ASP.Net, SQL Server and Project Server. He
has been involved in many large SharePoint
implementations including Internet and Intranet sites, Partner
Portals, Enterprise Content Management and Governance,
and much custom application integration and development.
Author, Speaker and Blogger
Email : brian.culver(at)expertpointsolutions.com
Twitter : @spbrianculver
LinkedIn : https://www.linkedin.com/in/bculver
Blog : http://blog.expertpointsolutions.com
4. Session Agenda
What is the SharePoint Framework (SPFx)?
Where does the SharePoint Framework fit?
SharePoint Framework Toolchain
JavaScript Frameworks
SharePoint Framework Build Flow
SharePoint Framework Developer Environment
5. What is the SharePoint Framework (SPFx)
New client-side framework for building Modern UI
customizations
Built on the well-known web stack
Open model, not tied to Microsoft tools
Works great on the cloud
Available on-premises for SP2016 with Feature Pack 2 (
and newer)
Enterprise-ready when used with back-end services
REST API and micro-services, Azure Functions, etc.
Build client-side Web Parts or client-side Extensions
Some key features of the SharePoint Framework:
Runs in the context of the current user and the connection in
the browser. No IFRAMEs for the customization (JavaScript is
embedded directly to the page).
The controls are rendered within the page DOM.
The controls are responsive, accessible and mobile friendly.
Developers are able to access the page lifecycle fully, including
rendering, loading, serializing and deserializing, configuration
changes, and more.
Framework-agnostic. Use any JavaScript framework: React,
Knockout, Angular, Bootstrap and more.
The toolchain is based on common open source client
development tools such as npm, nvm, TypeScript, Yeoman,
Yarn, webpack, and gulp.
Performance is reliable.
End users can use SPFx client-side solutions that are approved
by the tenant administrators (or their delegates) on all sites,
including self-service team, group, or personal sites.
SPFx web parts can be added to both classic and modern
pages. Modern pages can only use client-side web parts.
6. Where does the SharePoint Framework fit?
Full Trust Solutions
Server-side code
Full server side API
Only supported on-premise
Visual Studio Only
Farm Scoped
Webparts, Timers Jobs, Event Receivers (Feature, Web, Site,
List, etc.)
Sandbox Solutions
Restricted Server-side code
Declarative Solutions only supported in SPO
Visual Studio Only
Site Collection Scoped
Features & Declarative Solutions
Site columns, content types, Lists, List instances, File
Resources, etc.
SharePoint Add-in / Apps
Client-side or Server-side code
Client-side API
Execution context was externalized from SharePoint and
displayed via IFRAMEs
Visual Studio Only
Tenant and Site Scoped
SharePoint Framework (SPFx)
Client-side code
Execution context is in the page (yeah Baby!!)
Open source and cross-platform tooling
Tenant Scoped
Only way to customize modern pages
Responsive, accessible and mobile friendly
Client-sde web parts and extensions
10. SPFx Developer Environment
Office 365 Tenant
App Catalog
Developer Site
Azure
Node.js (LTS – Long Term Support) - www.nodejs.org
NPM v. 3
npm install -g npm@3
Yeoman or Yarn
npm install -g yo
npm install -g yarn
Chocoletey
yarn install v0.24.6
Gulp
npm install -g yo gulp
Yeoman SharePoint Generator
npm install -g @microsoft/generator-sharepoint
Configure SSL for localhost testing environment
gulp trust-dev-cert
IDE of Choice
Notepad or Notepad++
Visual Studio Code
Visual Studio 2015/2017
https://marketplace.visualstudio.com/items?itemName=Share
PointPnP.SPFxProjectTemplate
Atom
Storm
Sublime
Etc.
Webpack
11. SPFx Developer Environment
Console for Node.js
PowerShell
CMDER for Windows - http://cmder.net/
Etc.
Code Editor
Visual Studio Code
Visual Studio 2015/2017
https://marketplace.visualstudio.com/items?itemName=SharePointPnP.SPFxProjectTemplate
Atom
Storm
Sublime
Etc.
Source control system and Project management
GitHub
VSTS
Etc.
Additional tooling
Fiddler - http://www.telerik.com/fiddler
Postman - https://www.getpostman.com/
12. Code Editors
Open source code editor
Windows, Mac and Linux
Built-in support for JavaScript,
TypeScript and Node.js
Powered by rich ecosystem of
extensions for Visual Studio Code
Extensions for other languages
Debugger extensions
Source code repository extensions
And more…
•
•
•
•
Community-driven SPFx extensionPreferred SPFx code editor
14. Writing conditional code
Global constants
Uses Webpack DefinePlugin
Different behaviors between
development and release builds
Available constants
DEBUG
UNIT_TEST
..and more internal constants
15. Custom gulp tasks
Define custom gulp tasks in gulpfile.js: build.subtask and build.task
let helloWorldSubtask = build.subTask('log-hello-world-subtask',
function(gulp, buildOptions, done) {
return gulp.src('images/*.png')
.pipe(gulp.dest('public'));
})
let helloWorldTask = build.task('hello-world', helloWorldSubtask);
gulp hello-world
17. Component bundles
Components into a single .js file
Loaded on demand by SharePoint
Choose between:
One bundle per component
One bundle multiple
components
Dependencies are optional
Do not include dependencies in your bundle. Keep it small and simple!
20. Constructive Feedback Is Appreciated
Great information,
but would like to
have learned more
about [Insert Topic]Brian – Your
presentation
was …
Good
Demos!
Thanks!
21. Join us right after at The Urge
Socialize and unwind after our day of learning.
Urge Gastropub & Common House
(practically across the street)
255 Redel Road, San Marcos, CA 92078
https://sm.urgegastropub.com/
Thank you for joining us today!
Don’t Forget SharePint