This document discusses patterns and considerations for developing add-ins for SharePoint. It covers the differences between SharePoint hosted and provider hosted add-ins. It also discusses things to consider like development skills required, hosting options, future-proofing, customers, and costs. Examples of using CSOM and REST APIs to create sites are provided.
9. Development
C# vs JavaScript vs PowerShell
C# REST vs CSOM
SharePoint API, Databases, Web Services
SharePoint Content Types, Lists and Libraries
Facebook, Instagram, Google +, Linkedin
10. using (var clientContext = spContext.CreateUserClientContextForSPHost())
{
if (clientContext != null)
{
WebCreationInformation creation = new WebCreationInformation();
creation.Url = webTitle;
creation.Title = webTitle;
Web newWeb = clientContext.Web.Webs.Add(creation);
clientContext.Load(newWeb);
clientContext.ExecuteQuery();
}
}
Create Site with Strongly Typed CSOM