patterns in add ins espc15
TRANSCRIPT
Patterns in Add-insfor SharePoint
Sonja Madsen
Add-ins
SharePoint hosted Provider hosted
TransportBaggageTimeCostPeopleCount
Patterns and Decision Making
SharePoint MVPSONJASAPPS ConsultingSpeaker
@sonjamadsen sp2013.blogspot.com [email protected] www.sonjasapps.com
Sonja Madsen#WPC15 Best International Developer
Things to Consider• Development• Skills• Customers• Content• Hosting• Future-proofing• Cost
Skills• Front-end• Back-end• Hosting
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
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
Query.ajax({ url: "http://<site url>/_api/web/webinfos/add", type: "POST", data: JSON.stringify( {'parameters': { '__metadata': { 'type': 'SP.WebInfoCreationInformation' }, 'Url': 'RestSubWeb', 'Title': 'RestSubWeb', 'Description': 'REST created web', 'Language':1033, 'WebTemplate':'sts', 'UseUniquePermissions':false} } ), headers: { "accept": "application/json; odata=verbose", "content-type":"application/json;odata=verbose", "content-length": <length of post body>, "X-RequestDigest": $("#__REQUESTDIGEST").val() }, success: doSuccess, error: doError });
Create site with REST
DEMOInstagram, CoffeeMaker
Instagram Demo - SharePoint Hosted
App PartStart PageJavaScript
Content• Security Considerations• IP Considerations• EU Regulations
SharePoint Hosted
ListContent TypeApp PartStart pageJavaScript
Provider Hosted
ListContent TypeJavaScript
C# code-behindStart page
SharePoint hosted
Provider Hosted
C# code-behindStart pageSend emailSchedule emailDatabase
SharePoint hosted
Future-Proofing
Future-Proofing• Maintenance• Scalability• Upgrade to SharePoint 2016• Support• Lifetime
Customers• Custom Add-in or Office App Store• Number of Instances per Customer• Mobile Devices• Authentication• Provider
C# code-behindStart page
Send emailSchedule emailDatabase
C# code-behindStart page
Send emailSchedule emailDatabase
C# code-behindStart page
Send emailSchedule emailDatabase
C# code-behindStart page
Send emailSchedule emailDatabase
Hosting• SharePoint on-premise or Office 365• Hosting on Azure or On-premise• Hosting partner
Cost
Summary
SharePoint MVPSONJASAPPS ConsultingSpeaker
@sonjamadsen sp2013.blogspot.com [email protected] www.sonjasapps.com
Sonja Madsen#WPC15 Best International Developer