|
1 | 1 | # SharePoint Framework development with SharePoint 2016 Feature Pack 2
|
2 | 2 |
|
3 |
| -SharePoint 2016 Feature Pack 2 support SharePoint Framework client-side web parts in classic SharePoint pages. |
| 3 | +SharePoint 2016 Feature Pack 2 supports SharePoint Framework client-side web parts hosted in classic SharePoint pages. |
4 | 4 |
|
5 |
| -Introduction to SharePoint Framework development in SharePoint 2016 Feature Pack is also covered in following video at [SharePoint PnP YouTube Channel](https://www.youtube.com/watch?v=LGLMxnmHk6U&list=PLR9nK3mnD-OXZbEvTEPxzIOMGXj_aZKJG). |
| 5 | +An introduction to SharePoint Framework development in SharePoint 2016 using Feature Pack 2 is also covered in the following video on the [SharePoint PnP YouTube Channel](https://www.youtube.com/watch?v=LGLMxnmHk6U&list=PLR9nK3mnD-OXZbEvTEPxzIOMGXj_aZKJG). |
6 | 6 |
|
7 | 7 | <a href="https://www.youtube.com/watch?v=LGLMxnmHk6U&list=PLR9nK3mnD-OXZbEvTEPxzIOMGXj_aZKJG">
|
8 | 8 | <img src="../../images/spfx-fp2-youtube-video.png" alt="Screenshot of the YouTube video player for this tutorial" />
|
9 | 9 | </a>
|
10 | 10 |
|
11 |
| -## When to use which SharePoint Framework version? |
| 11 | +## Which version of the SharePoint Framework to use |
12 | 12 |
|
13 |
| -Since SharePoint Online and SharePoint 2016 has different release cycle for the new capabilities, they do support different capabilities also for the SharePoint Framework. SharePoint Online is always using the latest version of the SharePoint Framework, but SharePoint 2016 will support the version, which is matching server-side dependencies of the deployed packages. |
| 13 | +Since SharePoint Online and SharePoint 2016 have different release cycles for new capabilities, they also have different capabilities when it comes to the SharePoint Framework. SharePoint Online always uses the latest version of the SharePoint Framework, but SharePoint 2016 only supports the version which matches the server-side dependencies of the deployed packages. |
14 | 14 |
|
15 |
| -SharePoint 2016 Feature Pack 2 has support for the SharePoint Framework client-side web parts hosted in the classic SharePoint pages with SharePoint Framework v1.0. This means that when you are targeting your customization to SharePoint 2016 platform, you'll need to use SharePoint Framework v1.0.2 version due server-side version dependency. |
| 15 | +SharePoint 2016 Feature Pack 2 supports SharePoint Framework client-side web parts hosted in classic SharePoint pages built using the SharePoint Framework v1.0. This means that when you are targeting the SharePoint 2016 platform, you'll need to use the SharePoint Framework v1.0.2 due to the server-side version dependencies. |
16 | 16 |
|
17 |
| -If you are planning to use same client-side web parts in both SharePoint 2016 and in SharePoint Online, you will need to use the SharePoint Framework v1.0.2 as your baseline version to ensure that the web part works in both environments. |
| 17 | +If you are planning to use the same client-side web parts in both SharePoint 2016 and in SharePoint Online, you will need to use the SharePoint Framework v1.0.2 as your baseline version to ensure that the web part works in both environments. |
18 | 18 |
|
19 |
| -## Installing SharePoint Framework version for SP2016 development |
| 19 | +## Installing the SharePoint Framework version needed for SP2016 development |
20 | 20 |
|
21 |
| -You should ensure that you are using the right version of SharePoint Framework in your development machine. You can check the currently globally installed SharePoint Framework Yeoman template package version by executing following command. |
| 21 | +You should ensure that you are using the right version of the SharePoint Framework on your development machine. You can check the currently globally installed SharePoint Framework Yeoman template package version using the following command: |
22 | 22 |
|
23 | 23 | ```
|
24 | 24 | npm list -g --depth 0
|
25 | 25 | ```
|
26 | 26 |
|
27 |
| -This will list the globally installed packages, including their versions. You can uninstall newer version by using following command. |
| 27 | +This will list the globally installed packages, including their versions. If the `@microsoft/generator-sharepoint` package version is incorrect, you can uninstall the generator by using the following command: |
28 | 28 |
|
29 | 29 | ```
|
30 | 30 | npm uninstall -g @microsoft/generator-sharepoint
|
31 | 31 | ```
|
32 | 32 |
|
33 |
| -To install v1.0.2 version of the SharePoint Framework Yeoman templates, you can execute following command. |
| 33 | +To install v1.0.2 of the SharePoint Framework Yeoman templates, you can use the following command: |
34 | 34 |
|
35 | 35 | ```
|
36 | 36 | npm install -g @microsoft/[email protected]
|
37 | 37 | ```
|
38 | 38 |
|
39 | 39 | ## Hosting your SharePoint Framework solution for on-premises deployment
|
40 | 40 |
|
41 |
| -Getting SharePoint Framework client-side web parts deployed to on-premises will require two distinct actions. |
| 41 | +Getting SharePoint Framework client-side web parts deployed to on-premises requires two distinct actions: |
42 | 42 |
|
43 |
| -- Deployment of the solution package to SharePoint app catalog |
44 |
| -- Hosting JavaScript files in centralized ___location |
| 43 | +- Deployment of the solution package to the SharePoint app catalog |
| 44 | +- Hosting the JavaScript files in a centralized ___location |
45 | 45 |
|
46 |
| -You can host JavaScript files in any suitable ___location for you depending on the environment details. These files can be for example hosted in following locations. |
| 46 | +You can host the JavaScript files in the ___location that best fits your environment. For example, these files can be hosted in any of the following locations: |
47 | 47 |
|
48 |
| -- **Azure CDN** - Similar setup as with SharePoint Online. Does require end users to have Internet connectivity |
49 |
| -- **Local server in corporate network** - Server hosting the JavaScript files for the corporate network. This can be using whatever technology as long as files are accessible with http requests. |
50 |
| -- **SharePoint 2016** - You can also host your files in the local SharePoint farm. You can for example define a standardized site in your farm where all the SharePoint Framework assets are being hosted. Notice though that by default .json files are not allowed to be uploaded to SharePoint 2016 libraries, so farm level settings will need to be adjusted for this option. |
| 48 | +- **Azure CDN** - Similar setup as with SharePoint Online. Requires end users to have Internet connectivity. |
| 49 | +- **Local server in your network** - A server hosting the JavaScript files for your corporate network. This can be using whatever technology desired as long as the files are accessible through http requests. |
| 50 | +- **SharePoint 2016** - You can also host your files in the local SharePoint farm itself. You can, for example, define a standardized site in your farm where all the SharePoint Framework assets are being hosted. Take note, however, that by default .json files are not allowed to be uploaded to SharePoint 2016 libraries. So farm level settings will need to be adjusted for this option. |
51 | 51 |
|
52 |
| -> You can find more details on the blocked file types in SharePoint 2016 from following support article: [Types of files that cannot be added to a list or library](https://support.office.com/en-us/article/Types-of-files-that-cannot-be-added-to-a-list-or-library-30be234d-e551-4c2a-8de8-f8546ffbf5b3#ID0EAADAAA=2016) |
| 52 | +> You can find more details on blocked file types in SharePoint 2016 from the following support article: [Types of files that cannot be added to a list or library](https://support.office.com/en-us/article/Types-of-files-that-cannot-be-added-to-a-list-or-library-30be234d-e551-4c2a-8de8-f8546ffbf5b3#ID0EAADAAA=2016) |
53 | 53 |
|
54 | 54 | ## Development environment considerations
|
55 | 55 |
|
56 |
| -When you are developing SharePoint Framework client-side web parts, you should have normally Internet connectivity to access npm packages. This is required when solutions are being scaffold using SharePoint Framework Yeoman templates. |
| 56 | +When you are developing SharePoint Framework client-side web parts you need Internet connectivity to access npm packages. This is required when solutions are being scaffolded using the SharePoint Framework Yeoman templates. |
57 | 57 |
|
58 |
| -If Internet access is not available for the development machines, you can also setup local on-premises registry for needed npm packages. This does however require additional software and significant amount of work to operation and to update based on new versions and packages in actual npm gallery. |
| 58 | +If Internet access is not available for the development machines, you can setup a local on-premises registry for the required npm packages. However, this requires additional software and a significant amount of work to setup and maintain local package versions with packages in the actual npm gallery. |
59 | 59 |
|
60 |
| -> [Team-based development on the SharePoint Framework](team-based-development-on-sharepoint-framework.md) guidance includes different options around the development environment setup also when you might need to support multiple SharePoint Framework versions. |
| 60 | +> The [Team-based development on the SharePoint Framework](team-based-development-on-sharepoint-framework.md) guidance document includes different options for development environment setup including when you might need to support multiple SharePoint Framework versions. |
61 | 61 |
|
62 |
| -## How to determine which SharePoint Framework version was used for a solution? |
| 62 | +## How to determine which SharePoint Framework version was used for a solution |
63 | 63 |
|
64 |
| -If you have already existing SharePoint Framework solutions and you'd like to confirm the used SharePoint Framework version for them, you'll need to confirm this potentially from following locations. |
| 64 | +If you have existing SharePoint Framework solutions and you'd like to confirm which version of the SharePoint Framework was used for them, you'll need to check the following locations: |
65 | 65 |
|
66 |
| -- **.yo-rc.json** file in solution root folder defines used SharePoint Framework Yeoman template version when the solution was created. |
67 |
| -- **package.json** file in the solution root folder contains references to versions when the solution was created. |
68 |
| -- **npm-shrinkwrap.json** file in the solution root folder will contain information on the exact versions, if you have used the `npm shrinkwrap` command for the solution to lock-down the exact versions. |
69 |
| --- **package.json** file in *node_modules\@microsoft/sp-webpart-base* folder contains a *version* attribute matching used SharePoint Framework version, if you have installed packages to your solution. |
| 66 | +- **.yo-rc.json** - file in the solution's root folder that stores the SharePoint Framework Yeoman template version used when the solution was created. |
| 67 | +- **package.json** - file in the solution's root folder that contains references to package versions used in the solution. |
| 68 | +- **npm-shrinkwrap.json** - file in the solution's root folder that contains information about the exact versions used (if you used the `npm shrinkwrap` command to lock-down the exact versions of the solution). |
| 69 | +-- **package.json** - file in the *node_modules/@microsoft/sp-webpart-base* folder that contains a *version* attribute matching the used SharePoint Framework version, if you have installed packages to your solution. |
0 commit comments