Once again, I have been scanning the Rencore archives, and here are 5 SharePoint Framework tips from the blog posts of MVP and Head of Product at Rencore, Waldek Mastykarz, for creating better SharePoint solutions. We hope you find this list useful.
Please feel free to comment if there are any others you feel are worthy. And click on the links to view the blogs in full.
“SharePoint Framework (SPFx) was released to the general public in 2017, specifically for building customizations for SharePoint. Furthermore, it helps developers building client-side solutions that integrate with the modern SharePoint UX.“
Waldek’s explain further in his blog post that you can use any type of JavaScript framework, and development isn’t limited to Windows and Visual Studio, meaning developers can build SharePoint solutions on any platform, including OS X and Linux using a code editor of choice.
By using SPFx, your solution will function correctly across multiple devices such as desktop and mobile. The content will be displayed and will work as intended when navigating to a modern team site. However, it is important to remember SPFx is based on JavaScript and runs in the browser of the specific user accessing the script, so you should be particularly careful when running custom solutions as there is no elevation and security trimming. This is one of the reasons why using the SharePoint Add-in model is still a valid option.
If you are getting to grips with SPFx for the first time, you might want to try it in isolation away from any current projects you are currently working on. Waldek recommends that you run SPFx in a Docker container to isolate SPFx dependencies, optimize development environment set up, as well as making sure you are using the correct SPFx version for your chosen project.
Waldek’s blog post is a step by step instruction on how to run SPFx in isolation using docker. It’s worth reading if you want to utilize his best practices.
To keep your SharePoint environment modern, up to date, and in line with SharePoint development best practices, there are several ways you can migrate your client-side customizations to SharePoint Framework. You can use and replicate existing scripts or rewrite the customization completely.
This comprehensive blog post tells you step-by-step how you can migrate a JavaScript customization that specifically uses jQuery to communicate with SharePoint.
Like SPFx, Visual Studio Code (VS code) was born out of a necessity to be modern and flexible (work over different platforms). It has now grown significantly in popularity since its incarnation in 2015 and was reported in stack overflow’s Developer Survey Results 2019 as the most popular development environment (50.7%) with the Visual Studio IDE (31.5%) coming second.
Seeing a need to optimize the SharePoint framework solution test process using VS Code, Waldek found a solution. He created the Rencore Deploy SPFx Package Visual Studio Code extension, which bypasses the need to deploy the solution package in the app catalog manually or use command-line tools such as PnP PowerShell or the Office 365 CLI.
Rencore’s SPCAF is the only solution on the market that analyzes and assures your SharePoint code quality. You can check violations against a growing number of SPFx rule-sets regarding security, performance, best practices, maintainability, and supportability.
Try our Microsoft trusted analysis software for free today. Click the button below to learn more!