SharePoint Saturday Brussel October 15, 2016
Last weekend I visited SharePoint Saturday in Brussel Belgium. This was my fourth time here in Belgium and again a great one. The day was setup up 6 sessions of 50 minutes and a lunch break of 1.5 hours with a 30 minute.
We started at 9 with a welcome from the BIWUG team and the first session started short after that. I started with some developer sessions.
Get Typing with TypeScript
I started the day with a session from David Opdendries (@sharepointdavid)
This session was all about what typescript is and how to get started with it. I have never worked with this yet, so this is very new to me but a must learns for me.
TypeScript is a typed superset of JavaScript and will compile into plain JavaScript. It compiles into ECMAScript 5
TypeScript 2.0 is just released.
TypeScript is class based like C#
A good resource to learn
www.typescriptlang.org/play/index.html
To setup TypeScript you need a file called tsconfig.json
This file has the configuration, what files need to be compiled, where to find it and what version to use
When you compile TypeScript files, you get a .js and a .js.map file. The .js.map file is used for debugging
When you use it with other types, you need to add typing files
The SharePoint Typing file can be downloaded from NuGet
You need to Drag this typing file to the ts file or define it in the tsconfig.json file
TypeScript and Promises
A nice clean way to deal with async tasks, it is part of ES6
Can be used instead of callbacks
To use it add a NuGet package ES6.promise.typescript
You can chain promises or an array of promises
Article in the slides has a good link for resources
You can create modules, this will create individual JavaScript file. This way you can load the scripts that you need
Popular libraries
Require.js
System.js
To get this, you need to use “OutDir” instead of “OutFile” in the config and you need to add a Module type. “amd” is the most common
Before loading require.js load es6-promise.js
Deep dive building solutions on the SharePoint Framework
After my introduction session about TypeScript Waldek Mastykarz (@waldekm) took us with him building with the new SharePoint framework. He created a lot of blog posts about this and now walked thru the options and possibilities of the framework
When you create a new webpart project you have the option to choose from a few frameworks
- No framework
- Knockout
- React
When you use npm to add packages always use –save or -S to save the modules. Otherwise your coworkers won’t get them when they pull down the project from version control
The latest version of the SharePoint framework uses TypeScript 2 Webparts by default contain all the code including the modules you are using and bundles this. These bundled files are very big when you only have the hello world webpart. It is best to create references to the modules you use. This can be changed in the config.json. this file has an “Externals” part where you can add them. If the reference you create is not a module you need to use the full path and name, if it is a module you can use only the path.
This also helps you to create 1 version for every webpart. Try to use as few versions of frameworks in your intranet
Non-AMD scripts can only depend on non-AMD scripts
Try to avoid non-AMD scripts because this will overwrite the scripts on the page. AMD scripts are contained in the webpart.
The property pane of a webpart is in reactive mode, you can change this with a property at the end of the webpart page. This gives you a apply button
In the render method you have an option to render once with “this.renderonce === false”
Validation of webpart properties are available by adding a onGetErrorMessage to your property
When you use promises in the onGetErrorMessage you need to resolve It always
Extend your office 365 environment to cross-platform apps
I continued with development with this session from Alexander Meijers (@ameijers).
This session was about creating a mobile app that uses Azure AD with as much shared code as possible. This can be done with Xamarin. Besides the shared code you have the option to create code specific for the operating system. Xamarin makes it possible to create apps for iOS, Android, Windows 8 and Windows Universal App
When you create a new project you have to options to create this
- SAP (Shared Assed Project)
- PCL (Portable Class libraries)
Use the Xamarin Forms for easy development There is an preview for an iOS emulator, but you still need a Mac to compile
When you update Xamarin, you also need to update your agents
If your app needs admin consent, add $prompt=admin_consent to the url
To get a userprofile picture use the url /_layouts/15/UserPhoto.aspx
Specify the size, url and account name
Analyzing SharePoint logs with HDInsight
After the break I went to a session of our colleague from Spain, Edin Kapic (@ekapic)
He did a session on how to use big data and finding patterns and not the relations between the data. Traditional database systems cannot handle this so we need to find other solutions for this.
Apache Hadoop is such a solution and available on Azure. This will lower the entrance barrier for big data.
Hadoop has multiple distributions, these 2 are the most common: Cloudera and Hortonworks
Edin likes Hortonworks
Hadoop architecture had a Head n
ode (master) and data nodes (workers)
For every 16 data nodes you need a master node
MapReduce is for processing files, Storm is for realtime streams
Ambari is the management layer and IDE of Hadoop
HDFS is the filesystem for Hadoop; you can use REST and PowerShell to interact with this
HDInsight is Microsoft Azure managed Hadoop service.
Billed per hour until deleted
It is based on Hortonworks Hadoop VM’s
HDFS is implemented via Azure Blob Storage
The state of the SharePoint PowerShell Nation 2016
This session was given by Spencer Harbar (@harbars).
It was about creating and maintaining SharePoint farms with PowerShell, we all used snippets from the internet to create or do stuff on a SharePoint farm, but do we actually know what they do in the end? Some of these uber scripts like AutoSPInstaller; SPAuto; AutoSPDeploy and many more have a lot of plumbing and are massive, when something goes wrong it is hard to find where and how to fix it.
Another issues with these scripts is that they are focusing on the initial configuration and not the maintenance of the farm.
A good saying from Spencer is that you need to become a tool maker rather than a ’tool’. Create scripts that you can use over and over again and keep them in your toolbox. This will cost a bit more time in the beginning but will payout in the medium time. Invest in creating this ’toolkit’ for common administration tasks; This is what I am doing and even sharing with all of you on this blog.
$? Will give you the return of the last command
Also stay current with the PowerShell Platform capabilities and give feedback to Microsoft what needs fixed.
From design to a modern Style Guide – Branding strategies for SharePoint and Add-ins
The last session of the day was from Stefan Bauer (@stfbauer)
Branding is requested because it is a company communication channel
It increases identification with the company
You should brand the content and not the application. In Office 365 you can change the color of the application with a theme
Photoshop to HTML5 link is broken, this worked good for some time when SharePoint was displayed on just 1 screen size. These days it must be displayed on multiple devices with multiple screen sizes.
Also test it on these devices and not only resize your screen
SuiteCSS is a naming convention (https://github.com/suitcss)
The frameworks are great but not for SharePoint because you have about 95% of unused code
With bootstrap you can download a part of it to go to their website and just select what you need.
Create a style guide for the project you deliver, this way new people to the project can find and reuse it. This way it will give a consistent web design.
Material design https://material.google.com
OfficeUI Fabric is not made for SharePoint, the classic design. You can use it in your add-ins
It is made for the new SharePoint experience
Do not design for a certain device, but check what your breakpoints are on the design and build for that.
Stefan build one and is available on GitHub https://github.com/StfBauer/SimpleStyle
Stefan and Waldek created a project for using the graph API person cards
Stefan created the style guide
Waldek build the application and used the style guide
The designer should build the design as a design guide instead of the old way of Photoshop
Raffle
And as always there are some prices to win at the end of a SharePoint Saturday and this time I won a full conference pass to the European Collaboration Summit 2017 in Zagreb in May J