Share via


Site Templates vs Site Definition vs Web Templates vs Remote Provisioning

Site templates are the one’s which are created by using the “Save site as template” functionality from the site settings.Saving sites as template is not supported for publishing sites.Site templates are only available in the Site scope, meaning that you can’t directly create new site collections based on site template

Web templates is technique based on WebTemplate feature framework element, which was introduced in SharePoint 2010. Technique provides us a way to use alternative onet.xml during provisioning time of the sites without any dependencies on that onet.xml file when provisioning has been completed.
We need to create two files for each of the web templates. Other one is empty element (is VS2010 is used) for defining the actual WebTemplate element and other one is completely similar onet.xml file as for site definitions. WebTemplate element is supported in two scopes, which are Farm and Site
One big advantage of the web templates is the fact that since they are feature based and there won’t be any files stored in file system, those are completely supported usually by the cloud services, like MS Online (BPOS). One really important advantage with the web templates compared to the site templates is the fact that we can utilize the publishing features in web templates.

Site definitions are the classic xml files, which are for example used to provision out of the box sites. Many of the developers learned to create these in 2007 version, since they are very powerful and there were almost no other options available for introducing new options for the Create site functionality. As mentioned earlier site definition consists basically from two different files: WebTemp*.xml and onet.xml files.WebTemp*.xml defines how the site definition is visible for the end users and the onet.xml file contains the definitions for the actual site provisioning.One of the key downside is also the fact that site definitions will require full trust or farm solutions, which means that they are only supported in on-premises deployment

Remote provisioning is model where we actually do the template system outside of the SharePoint by using the new SharePoint app patterns. In this case we would be using provider hosted pattern to provide customizable sub site creation experience for the end users of the SharePoint.This model is suitable for both on-premises and Office365, which is clearly beneficial from long term maintenance and operation perspective

For more details:
http://blogs.msdn.com/b/vesku/archive/2013/08/23/site-provisioning-techniques-and-remote-provisioning-in-sharepoint-2013.aspx
http://blogs.msdn.com/b/vesku/archive/2010/10/14/sharepoint-2010-and-web-templates.aspx