Expand Minimize

SMA267701: Consider different implementation of WebTemplate

There is no direct replacement for WebTemplate in the App Model. WebTemplate are used during creation of a site and provisions ListTemplates, ContentTypes etc. The alternative implementation focusses on a completely different approach for site provisiong.

CheckId SMA267701
TypeName WebTemplateRecommendations
Severity CriticalError
Type WebTemplates

Full Trust Approach App Approach
Use of XML to provision the Artifacts

The custom WebTemplate describe the provisioning process of a site in XML and SharePoint provision the artifacts.

A WebTemplate is deployed via Full Trust Solutions (WSP) to a SharePoint farm and typically contains 2 XML files which are deployed to the SharePoint file system.

Remote Provisioning

The provisioning is managed outside of SharePoint. All artifacts are deployed via CSOM to SharePoint.

A custom provisioning engine (e.g. with Powershell, external webservices or client applications) manages the creation of sites and applies changes via CSOM.

Impact of Full Trust Approach Benefit of App Approach
Migration Difficulty

This is a critical blocker for migrations because SharePoint content (such as team sites) is based on a custom site definition and cannot be migrated easily.

In a migration from SP 2010 to SP 2013 (if the target 2013 environment allows custom WebTemplates) the 2010 WebTemplates often cannot be used without changes because they keep using 2010 features and may look like 2010 sites in a 2013 environment (with the limited feature set). Additionally some SP 2010 features are no available in SP 2013.

In SharePoint Online and in Office365 WebTemplates are not available.

Easier Migration

If this custom provisioning process is established and WebTemplates are completely avoided, all content and sites can be easily migrated to other SharePoint environments. Remapping the stapled features of SharePoint Out of the Box features in a WebTemplate can be very costly in development time.

Less Downtime for Deployments

New templates can be deployed without downtime for SharePoint because no WSP deployment to SharePoint is necessary. Only the site provisioning component needs to be updated.

Easier Backup/Restore

The backup/restore of a site is independent from deployed WSP solutions which reduced the complexity of a backup/restore process.

Efforts and Benefits

Migration Impact Critical
Re-Design Effort High
Re-Development Effort High
Long Term Benefit High

Effort Drivers

  • Easier Migration
  • Faster Disaster Recovery
  • Simpler Disaster Recovery

To suppress this violation in XML SharePoint code add the following comment right before the XML tag which causes the rule violation. Learn more about SuppressMessage here.

<!-- "SuppressMessage":{"rule":"SMA267701:WebTemplateRecommendations","justification":"Provide reason for suppression here"} -->
Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.