SharePoint Apps with Windows Azure Platform as a Service Don Kirkham Senior Engineer / Microsoft Solutions MCPD: SharePoint dkirkham@go-planet.com @DonKirkham Christopher Webb Senior Engineer / Microsoft Solutions MCSM: SharePoint cwebb@go-planet.com @chriswebb18
Intro/Poll Overview of IaaS, PaaS, SaaS Intro/Poll Changes in SPO Development & Pain Points
Changes to SPO Development & Pain Points
Full Trust Solutions Farm No real control Full trust solutions SP Code Customizations to file system of servers Hosted in same process as SharePoint More custom Server code: side aspx, SharePoint dlls, web services, API accessgac Classic model from 2007 Sandbox Sandbox Partial control Declarative elements Partially SP trusted Code code service still included for limited server side support Hosted in isolated process Sandboxed Custom Code Limited server side SharePoint API access App Model SP Apps Control, Trust, Manage New Apps model Deployed SP Code from corporate catalog or SharePoint store Isolated Manage App client permission side code and licenses specifically App code (client or Simple install and server) upgrade process Preferred option Support is a nightmare Upgrade is quite a challenge Securing code to run in hosted environments is effectively impossible Way too strict for developers Hard to maintain and expand Managed by your self Host/language independent Management and update easily doable per app Emprases reusability No server side sandbox, improved CSOM
Classic - Full trust solutions ISV solutions Platform level customizations to onpremises Custom service applications Custom WCF services SharePoint customizations, not customer-specific customizations Client Side Solutions Server side controls as JavaScript on page layouts and master pages Remote provisioning for elements Embracing un-ghosted model SP App dimension with provider-hosted apps to provide new capabilities Customer-specific customizations SP Apps App catalog based solution Packaged reusable solutions built for specific functionality Not only for marketplace or store, but also as platform for customerspecific customizations
Provider Hosted App
Contoso Registration of apps ACS 1 Approve and publish apps 2 App Admin Verification of registration 6 SharePoint Farm 3 5 Remote connectivity End users 4 Provider Hosted Apps spapp_appname.contoso.com
Scope URI http://sharepoint/content/sitecollection http://sharepoint/content/sitecollection/web http://sharepoint/content/sitecollection/web/list http://sharepoint/content/tenant Available Rights Read, Write, Manage, FullControl Read, Write, Manage, FullControl Read, Write, Manage, FullControl Read, Write, Manage, FullControl
IT S DEMO TIME!
OfficeDevPnP https://github.com/officedev/pnp/wiki
App Info Reference
Options Site Definition No Office365 Long term impact on costs Blocks transition to cloud Causes significant issues with future migration and upgrade Site Templates Poor site collection creation story Negative impact on upgrades Causes additional maintenance costs with evergreen Not with publishing features Web Templates Poor site collection creation story Causes maintenance costs with evergreen SP Server side provisioning Provision oob sites, but modify them based on user selection and requirements Standardization of site creation in code No Office365 Remote provisioning CSOM supports creation of site collections only in Office365 Standardization of site creation in code Can be done from any external system Support in cloud Options available Poor Fair Average Good Excellent Cost impact (short and long term)
SharePoint Farm 1 2 CSOM/REST Provider Hosted Apps 5 CSOM/REST 3 Remote Timer job Assets and configuration Branding Images Master Pages Page Layouts Other settings 4
Initial provisioning based on the out of the box site. Usually either team site or publishing site. Assets are uploaded from the provisioning engine using CSOM/REST 3 1 Remote Timer job Assets and configuration Branding Images Master Pages Page Layouts Other settings 2 Apply the needed changes (configurations etc.) on top of the out of the box site based on the user selection. This is the specialization part, but since we start from oob site, we always get the latest improvements to it as a base line. 3 3
IT S DEMO TIME!
Initial provisioning based on the out of the box site. Usually either team site or publishing site. Assets are uploaded from the provisioning engine using CSOM/REST 3 1 Remote Timer job Assets and configuration Branding Images Master Pages Page Layouts Other settings 2 Apply the needed changes (configurations etc.) on top of the out of the box site based on the user selection. This is the specialization part, but since we start from oob site, we always get the latest improvements to it as a base line. 3 3
SharePoint Farm 1 CSOM 3 Upload CSS Set JS Injection for CSS to be executed in page process Provider Hosted Apps Assets 2
SPCSPFont files describe the font scheme Specify New Page Layout Select New Master Page Specify New Background Image olor files describe the color palette SP Color
Theme Custom Master Page Can introduce any level of customizations When new changes are introduced to the out of the box master, those should be copied to custom master pages as well Additional maintenance burden Future major version upgrades will cause additional requirements to re-create the end user experience
SharePoint Farm 1 CSOM 3 Upload needed files Set theme to site (Set master page to Provider Hosted Apps Theme elements site) Color file Font file Background image (Master page) 2
Modify oob site definition provisioning model SharePoint Farm 2 3 1 15\Template\Features\ [StaplerFeature] element.xml <xml> 4 15\Template\Features\[StapledFeature]\ feature.xml <xml> <xml>
1 3 https://*.contosoapps.com 2 2 4 4 https://intranet.contoso.com/sites/team https://intranet.contoso.com /sites/groupx Root Sub site Root AppWeb News Organization Teams Search AppWeb
1 3 https://*.contosoapps.com Root 2 https://intranet.contoso.com /sites/catalog https://intranet.contoso.com/sites/t eam Root 4 AppWeb AppWeb Sub site https://intranet.contoso.com /sites/orgz Root 4 News Organization Teams Search
Centrally deployed Side loading Supports adding app parts and app custom actions to host web Requires specific feature to be enabled from host web for app installation No centralized control to add or remove the app No UI to deploy the app cross sites Application install/uninstall events do fire when deployed to sites
Don Kirkham Senior Engineer / Microsoft Solutions dkirkham@go-planet.com @DonKirkham https://github.com/officedev/pnp/wiki http://blogs.msdn.com/b/vesku/archive/2014/09/0 3/office-365-developer-patterns-and-practicesintroduction-to-the-program.aspx http://dev.office.com/sample-code Christopher Webb Senior Engineer / Microsoft Solutions MCSM: SharePoint cwebb@go-planet.com @chriswebb18
http://blogs.msdn.com/b/kaevans/archive/2014/04/02/de ploying-a-sharepoint-app-to-azure-as-part-of-abuild.aspx http://blogs.msdn.com/b/kaevans/archive/2014/03/04/bui lding-sharepoint-2013-apps-with-windows-azurepaas.aspx http://blogs.msdn.com/b/kaevans/archive/2014/02/24/cre ating-a-sharepoint-2013-app-with-azure-web-sites.aspx http://blogs.msdn.com/b/steve_fox/archive/2013/02/18/b uilding-your-first-provider-hosted-app-for-sharepointusing-windows-azure-part-1.aspx http://blogs.msdn.com/b/kaevans/archive/2014/09/28/ma king-sharepoint-apps-scale-with-azure-redis-cache.aspx
http://azure.microsoft.com/enus/documentation/articles/websites-dotnetwebjobs-sdk-get-started/ http://blogs.msdn.com/b/richard_dizeregas_blog/arc hive/2014/04/07/sharepoint-timer-jobs-running-aswindows-azure-web-jobs.aspx http://blogs.msdn.com/b/kaevans/archive/2014/03/0 2/building-a-sharepoint-app-as-a-timer-job.aspx