-->

Tuesday, 24 September 2013

Site Definition Versus Site Templates


Site Definition:

Site definitions consist primarily of multiple XML and ASPX files stored on a front-end web server in folders under the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\SiteTemplates directory.
-          Old & Out of Date
-          Involves managing of lot of tedious onet.xml and schema.xml files.
-          A site definition is installed on file system of web front ends
-          A site definition Page and List definition are cached at IIS process startup
 

Custom Site Templates:

 Custom web templates are stored in the database—specifically, the sandbox solutions gallery—and are created by using an existing site, with or without its specific content, as a model. This provides a means for reusing sites that you have customized.

 ***The first option for getting the SharePoint Designer changes beyond the current site is to take the site you have modified with SharePoint designer and save it as a template. You can download the template and upload this to another site collection and can create a site based on this template. Whenever you need a new site you can create it from the site template you have created. This is a good approach if the design is finalized and you want to reuse the same template in different site collections. But keep in mind you can't go back and apply the changes after the site is created. If you make any changes to the work that you did on the original site then those changes won't be reflected across the other SharePoint sites that were created from the same template. This is because each page exists separately in the SharePoint database.
 

 Major differences:

  • To create or use a site definition you need server admin access, but site template can install from web UI by site owners.
  • Site definition supports feature stapling, but for site template additional features must be activated in gallery.
  • Site definitions are stored on hard disk, but site templates are stored in content DB.
  • Site definition can provision multiple webs, but site templates are for single web only.
  • Creating site definition is relatively more complex than site template creation.
  • Performance wise Site definitions are better than site templates as files are stored on harddisk

Happy Sharepointing !

Please do Share/Like/Comment if this article was helpful.