1. An Insight company
Bob German
Principal Architect - BlueMetal
Introduction to the
SharePoint Framework
2. Thank You
EVENT Sponsors
We appreciated you supporting the
New York SharePoint Community!
• Diamond, Platinum, Gold, & Silver have
tables scattered throughout
• Please visit them and inquire about their
products & services
• To be eligible for prizes make sure to get your
bingo card stamped by ALL sponsors
• Raffle at the end of the day and you must be
present to win!
3. Bob German
Bob is a Principal Architect at BlueMetal, where he
leads Office 365 and SharePoint development for
enterprise customers.
Cloud & Services
Content & Collaboration
Data & Analytics
Devices & Mobility
Strategy & Design
An Insight company
@Bob1German
4. Agenda
• A Geological View of SharePoint
• Developing “from scratch” for the SharePoint Framework
• Client-Side Solutions
• Web Parts
• Single Page Apps
• List Apps
• Action Plan and Resources
@Bob1German
5. A Geological View of SharePoint
ASP.NET WebForms
ASP.NET AJAX, Scripting On Demand
SharePoint Page Models
XSLT
Custom Actions (JavaScript)
JSLink, Display Templates
Add-in Model
7. SharePoint Framework: A Clean Slate
• A completely new SharePoint UI for Office 365 and SharePoint 2016
• New client-side page model
• Modern and responsive – allows “mobile first” development for
SharePoint
• Mix classic and client-side pages in a SharePoint site
• Client-side web parts work on both classic and client-side pages
• It’s still early! Open questions:
• What OOB web parts will be available for the new pages?
• How will branding work?
• How flexible will the page layout be?’
• How will it integrate with the add-in model?
10. Comparing the Models
Add-in Models SP Framework
Mobile-ready
Direct access to page (e.g. Connected Web Parts)
Ease of Data Access
Ease of Upgrade (of your solution)
Protection from Untrusted Code
Storefront Distribution
@Bob1German
11. Open Source Tools
Trad New
Templating Visual Studio Yeoman http://bit.ly/SPF-Yeoman
Language C#, JavaScript Typescript http://bit.ly/SPF-TypeScript
Runtime Env’t .NET, JS Any JS Framework http://bit.ly/SPF-JSFrameworks
Code Editor Visual Studio Visual Studio Code
(or your choice)
http://bit.ly/SPF-VSCode
Packages nuget npm http://bit.ly/SPF-npm
Task Runner Visual Studio Gulp http://bit.ly/SPF-Gulp
Compiler Visual Studio tsc http://bit.ly/SPF-TypeScript
Bundling Visual Studio WebPack http://bit.ly/SPF-WebPack
Links are case
sensitive!
@Bob1German
12. Project Folder
/dest
/sharepoint
SP Framework Development Process
Project Folder
/src
JavaScript
Bundles
.spapp
Local
workbench
workbench.aspx
in SharePoint
Content Delivery
Network
SharePoint
Client-side “App”
Deplyed in
SharePoint
1
2
3
@Bob1German
13. Don’t Panic!
Microsoft is being more
open than ever before;
the software you are
about to see isn’t even in
preview yet.
The tools and user
experience will get a lot
better before it ships!
18. Splitting and Bundling
• Freely split your code into multiple files
• Each is translated to JavaScript and placed in a module based on the
filename
• TypeScript is compiled to JavaScript
• Less is compiled to CSS in a JavaScript string
• HTML becomes a JavaScript string
• JavaScript is just placed in the module
• Use exports and require to expose and consume across modules
• Advantages
• Ease of development / modularity
• Efficient download and caching
• Synchronous access (never wait for a script to load!)
21. What is Typescript?
Typescript is a subset of JavaScript, and is “transpiled” into
regular JavaScript.
• Static type checking catches errors earlier
• Intellisense
• Use ES6 features in ES3, ES5 (or at least get compatibility checking)
• Class structure familiar to .NET programmers
let x = 5;
for (let x=1; x<10; x++) {
console.log (‘x is ‘ + x.toString());
}
console.log (‘In the end, x is ‘ +
x.toString());
var x = -1;
for (var x_1 = 1; x_1 < 10; x_1++) {
console.log("x is " + x_1.toString());
}
console.log("In the end, x is " +
x.toString()); // -1
22. (1) Type Annotations
var myString: string = '<u>Results</u><br />';
var myNum : number = 123;
var myAny : any = "Hello";
myString = <number>myAny;
var myDate: Date = new Date;
var myElement: HTMLElement = document.getElementsByTagName('body')[0];
var myFunc : (x:number) => number =
function(x:number) : number { return x+1; }
var myPeople: {firstName: string, lastName: string}[] =
[
{ firstName: “Alice", lastName: “Grapes" },
{ firstName: “Bob", lastName: “German" }
]
Intrinsics
Any and
Casting
Built-in
objects
Functions
Complex
Types
23. (2) ES6 Compatibility
var myFunc : (nx:number) => number =
(n:number) => {
return n+1;
}
let x:number = 1;
if (true) { let x:number = 100; }
if (x === 1) { alert ('It worked!') }
var target: string = ‘world';
var greeting: string = `Hello, ${target}’;
“Fat Arrow”
function
syntax
Block
scoped
variables
Template
strings
24. (3) Classes and Interfaces
interface IPerson {
getName(): string;
}
class Person implements IPerson {
private firstName: string;
private lastName: string;
constructor (firstName: string, lastName:string) {
this.firstName = firstName;
this.lastName = lastName;
}
getName() { return this.firstName + " " + this.lastName; }
}
var me: IPerson = new Person("Bob", "German");
var result = me.getName();
Interface
Class
Usage
25. (4) Typescript Definitions
var oldStuff = oldStuff || {};
oldStuff.getMessage = function() {
var time = (new Date()).getHours();
var message = "Good Day"
if (time < 12) {
message = "Good Morning"
} else if (time <18) {
message = "Good Afternoon"
} else {
message = "Good Evening"
}
return message;
};
interface IMessageGiver {
getMessage: () => string
}
declare var oldStuff: IMessageGiver;
var result:string = oldStuff.getMessage();
document.getElementById('output').innerHTML = result;
myCode.ts
(TypeScript code wants to call legacy JavaScript)
oldStuff.js
(legacy JavaScript)
oldStuff.d.ts
(TypeScript Definition)
27. Client-Side Projects
1 Client-Side Web
Parts
Run on classic and client-side pages
2 Client-Side Apps
(single page)
Your Single-Page application hosted in
SharePoint
3 Client-Side Apps (list)
A SharePoint list with forms (AllItems, Display,
Edit, New)
31. So now what?
WTF! Is Microsoft serious?
When will it ship?
Where do I get it?
How do I get started?
32. Yes – Microsoft is serious about modernizing
SharePoint!
Prediction: Over the next few years, Microsoft will change
the entire SharePoint user experience to meet the needs of
a modern, mobile workforce.
It’s like upgrading a car, one part at a time – while you’re
driving it cross country!
Web Parts
O365 – mid 2016
New Pages
O365 – late 2016
SP2016 Feature Pack
early 2017
Web Era Cloud and Device Era
33. Yes – Microsoft is serious about modernizing
SharePoint!
The SharePoint Framework is additive!
• Classic SharePoint pages can run the new web parts
• Classic SharePoint sites can include the new full-page
solutions
It should be possible to transition our sites gradually to the
new model
Web Era Cloud and Device Era
34. Tooling Up
TypeScript TypeScript Site
• http://bit.ly/SPF-TypeScript
TypeScript Playground
• http://bit.ly/TSPlayground
Bob’s TS “Cheat Sheets”
• http://bit.ly/LearnTypeScript
WebPack WebPack Site
• http://bit.ly/SPF-WebPack
REST API’s SharePoint REST API reference
• http://bit.ly/SP-REST
Gulp Gulp task runner
• http://bit.ly/SPF-Gulp
VS Code Visual Studio Code
• http://bit.ly/SPF-VSCode
Join me Thursday at 3:45 for:
Future-Proof Development for SharePoint and
SharePoint Online
35. Conference Materials
• Slides / Demo will be posted on Lanyrd.com
• http://lanyrd.com/2016/spsnyc
• Photos posted to our Facebook page
• https://www.facebook.com/sharepointsaturdaynyc
• Tweet Us - @SPSNYC or #SPSNYC
• Sign Up for our NO SPAM mailing list for all
conference news & announcements
• http://goo.gl/7WzmPW
• Problems / Questions / Complaints / Suggestions
• Info@SPSNYMetro.com
36. • Visit ExtaCloud’s booth for wrist bands!
Scallywag's Irish Pub
508 9th Ave, between 38th & 39th.
[6 minutes walk]
Scallywags also serves food.
http://www.scallywagsnyc.com/
At the May 4th “Future of SharePoint” event, Microsoft announced a new page and web part model called the SharePoint Framework. This modern, responsive framework runs entirely on the client side, and is markedly different from previous SharePoint development models. In this session, you’ll get an early peek at the development process for client-side web parts and full-page applications using SharePoint Framework. You’ll learn about the architecture and tools, and what to start learning now so you can hit the ground running when the Framework ships later this year. Don’t miss this opportunity to get a head start on this exciting new development model!
Level: Overview
Audience: Developer Essentials, Architecture Essentials