Getting Started with SharePoint Framework (SPFx): Design and Build Engaging Intelligent Applications Using SharePoint Framework
By Vipul Jain
()
About this ebook
This book will give you in-depth knowledge of SharePoint Framework, by learning many real-time examples in SharePoint Online, based on the latest versions of SharePoint Framework.
Related to Getting Started with SharePoint Framework (SPFx)
Related ebooks
Rapid Application Development With CakePHP Rating: 0 out of 5 stars0 ratingsMastering Sharepoint Framework Rating: 0 out of 5 stars0 ratingsApache Solr PHP Integration Rating: 0 out of 5 stars0 ratingsImplementing C# 11 and .NET 7.0: Learn how to build cross-platform apps with .NET Core (English Edition) Rating: 0 out of 5 stars0 ratingsAngular 2 Components Rating: 0 out of 5 stars0 ratingsSymfony2 Essentials Rating: 0 out of 5 stars0 ratingsBuilding Web Services with Microsoft Azure Rating: 0 out of 5 stars0 ratings.NET 7 Design Patterns In-Depth: Enhance code efficiency and maintainability with .NET Design Patterns (English Edition) Rating: 0 out of 5 stars0 ratingsPractical Django 2 and Channels 2: Building Projects and Applications with Real-Time Capabilities Rating: 0 out of 5 stars0 ratingsAzure AD Domain Services A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsMicrosoft SharePoint A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsVMware NSX A Clear and Concise Reference Rating: 0 out of 5 stars0 ratingsVPS Server Setup Rating: 5 out of 5 stars5/5TypeScript Blueprints Rating: 0 out of 5 stars0 ratingsAzure Active Directory B2B Collaboration A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsNosql A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsApplication Performance Management (APM) in the Digital Enterprise: Managing Applications for Cloud, Mobile, IoT and eBusiness Rating: 0 out of 5 stars0 ratingsOutSystems A Complete Guide - 2021 Edition Rating: 5 out of 5 stars5/5Office 365 Security A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsHTML5 A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsHelp Desk Software Tools A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsMicrosoft Exchange 2013 Cookbook Rating: 0 out of 5 stars0 ratingsMicrosoft Graph API A Complete Guide - 2019 Edition Rating: 1 out of 5 stars1/5SCCM A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsDomain Controller A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsAWS Organizations Second Edition Rating: 0 out of 5 stars0 ratingsInstant SQL Server Analysis Services 2012 Cube Security Rating: 0 out of 5 stars0 ratingsUnderstanding Azure Monitoring: Includes IaaS and PaaS Scenarios Rating: 0 out of 5 stars0 ratingsJira Service Desk A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratings
Programming For You
Python: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5HTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5Java for Beginners: A Crash Course to Learn Java Programming in 1 Week Rating: 5 out of 5 stars5/5SQL: For Beginners: Your Guide To Easily Learn SQL Programming in 7 Days Rating: 5 out of 5 stars5/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Python Machine Learning By Example Rating: 4 out of 5 stars4/5101 Amazing Nintendo NES Facts: Includes facts about the Famicom Rating: 4 out of 5 stars4/5Pokemon Go: Guide + 20 Tips and Tricks You Must Read Hints, Tricks, Tips, Secrets, Android, iOS Rating: 5 out of 5 stars5/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Learn SQL in 24 Hours Rating: 5 out of 5 stars5/5SQL All-in-One For Dummies Rating: 3 out of 5 stars3/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5PYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/5Modern C++ for Absolute Beginners: A Friendly Introduction to C++ Programming Language and C++11 to C++20 Standards Rating: 0 out of 5 stars0 ratingsPython Projects for Beginners: A Ten-Week Bootcamp Approach to Python Programming Rating: 0 out of 5 stars0 ratings
Reviews for Getting Started with SharePoint Framework (SPFx)
0 ratings0 reviews
Book preview
Getting Started with SharePoint Framework (SPFx) - Vipul Jain
CHAPTER 1
Getting Started with SharePoint Framework
As we know, the development patterns for Office 365 and SharePoint has gone through various turns, and the newest turn in that is the SharePoint Framework. So, the next question is, why do we need yet another development way for SharePoint? Why do we need a SharePoint Framework? You will find the answer to these questions in this and subsequent chapters, so let’s get started!
Structure
In this chapter, we will cover the following topics:
History of SharePoint Development
Why SharePoint Framework is required
Overview of SharePoint Framework
Tools used in SharePoint Framework development
Setting up your development environment
Objective
After studying this chapter, you should be able to:
Understand the concept of SharePoint Framework
Understand the modern toolchain
Set up your development environment
History of SharePoint Development
SharePoint was launched as an on-premises product in 2001. Following is the image depicting different SharePoint versions:
Figure 1.1
SharePoint 2019 is also launched by Microsoft.
The following are the primary development methods or techniques which we generally use while doing development in SharePoint:
Farm solutions:
The first development model in SharePoint started with farm solutions, writing full trust code, and deploying WSPs. This approach was compelling, and developers could do whatever they wanted to do on the SharePoint Farm using the server object model. Developers can create functionalities like timer jobs, event receivers, central administration extensions, and so on, using farm solutions. They can also create features that can have farm, web application, site collection, or website scope. However, it made upgrades very difficult, and it made maintaining and keeping the environment secure very difficult.
Sandboxed solutions:
As compared to farm solutions, the sandboxed solution has limited scope and limitations. It’s like a box in which code cannot run outside the boundary of the box. Unlike farm solutions, sandboxed solutions scope is limited to a site collection only, and you cannot access objects above a site collection like a web application, farm, and so on. Whenever you create a sandboxed solution, the WSP file gets created in the Solution Gallery in Site Settings, and you can activate or deactivate the WSP based on the requirement.
Sandbox solution is no more developed in SharePoint on-premise and online development and being deprecated by Microsoft.
Add-ins (App Model):
It has been introduced in SharePoint 2013 and Office 365. It is based on iframe-based integration. This approach also has many disadvantages.
Script Injection:
Traditionally in classic SharePoint, you must have done Script Injection using Content Editor and Script Editor web-parts. With this approach, you can do almost everything on a SharePoint page; however, this is not the best-recommended approach.
No-script capability:
It is a tenant-widefull tenant setting that removes all content editor web-part and scripts from the page.
SharePoint Framework:
It is the new way of development in modern SharePoint. It is a custom and supported way from Microsoft, which allows embedding code inside SharePoint sites and pages. SharePoint Framework provides full support for client-side development and supports modern open-source toolchain like Yeoman, Gulp, and so on.
The following image gives a glimpse of different development methods or techniques discussed above:
Figure 1.2
The landscape of SharePoint and Office 365 Development
So, with that, let’s get started with the landscape of SharePoint and Office 365 development. Every SharePoint and Office 365 developer, or even business user, knows what web parts are. These are those canonical rectangular widgets or user-controls of pre-packaged functionality that the user can configure at runtime. Now the first release of the SharePoint Framework targeted this scenario. They called it client web parts. From a technology perspective, they are quite different, but from a user’s standpoint, they are the same rectangular widgets that the users are used to dropping on the SharePoint pages.
Why SharePoint Framework?
The question arises here is – why SharePoint Framework? We have so many ways of developing for SharePoint. Why do you need yet another way of development for SharePoint? So, as we know that in the starting days of SharePoint development, there were feature XML files, however with time, these types of solutions didn’t work well in the cloud (in terms of scaling) where multiple tenants run side-by-side. So, there are two main models that we generally use, that is, JavaScript injection and SharePoint Add-in model. Following are their pros and cons:
JavaScript injection: As we know, the most popular web parts in SharePoint Online are the Content Editor and Script Editor web parts. We can paste JavaScript directly in the Script Editor web part and can pass JavaScript code to the Content Editor web part by writing code in a .txt, .html, or .JS file. Hence, code runs in the same browser context as that of page.
The downside to this approach is that users can edit the page and can modify the code written in the Script Editor web part. Also, the Script Editor web part is not marked as Safe For Scripting,
which means the Script Editor web part will be blocked from executing on some of the sites like my-sites, team sites, and so