Two kinds of SharePoint Add-ins: SharePoint-hosted and provider-hosted.
Almost all major types of SharePoint components can be part of a SharePoint Add-in, including pages, lists, workflows, custom content types, list templates, web parts, and more.
SharePoint Add-in model
The current option for solutions that run in NoScript sites is the add-in/app-part model. This implementation creates an iFrame where the actual experience resides and executes. The advantage is that because it’s external to the system and has no access to the current DOM/connection, it’s easier for information workers to trust and deploy. End users can install add-ins on NoScript sites.
There are some downsides to this approach as well. First, they run in an iFrame. iFrames are slower than the Script Editor web part, because it requires a new request to another page. The page has to go through authentication and authorization, make its own calls to get SharePoint data, load various JavaScript libraries, and more. A Script Editor web part might typically take, for example, 100 milliseconds to load and render, while an app part might take 2 seconds or more. Additionally, the iFrame boundary makes it more difficult to create responsive designs and inherit CSS and theming information. iFrames do have stronger security, which can be useful for you (your page is inaccessible by other controls on the page) and for the end user (the control has no access to their connection to Office 365).
Add-Ins can work in different ways
- Immersive Full Page
- Part of a page – using a special kind of control called an add-in part, to surface an iframe element that contains the add-in.
- UI Custom Actions – As UI commands that extend ribbons and menus for lists, documents, and more.
SharePoint Add-ins, farm solutions, and “no code” sandboxed solutions are all run from within SharePoint
Add-ins don’t have custom code that runs on SharePoint servers. Instead, all custom logic moves “up” to the cloud, or “down” to client computers, or “over” to an on-premises server that is outside the SharePoint farm or SharePoint Online subscription. Keeping custom code off SharePoint servers provides reassurance to SharePoint administrators that the add-in can’t harm their servers or reduce the performance of their SharePoint Online websites.
Get started creating provider-hosted SharePoint Add-ins.
SharePoint_Provider-hosted_Add-Ins_Tutorials
https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/sharepoint-add-ins
https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/publish-sharepoint-add-ins
https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/configure-sp-provider-hosted-apps-for-distribution