Monday 7 May 2012

What is the difference between Site Definition and Site template?

To create or use site definition you need server admin access, but site template can install from web UI by site owners. 
2. Site definition supports feature stapling, but for site template additional features must be activated in gallery. 
3. Site definitions are stored in hard disk, but site templates are stored in content DB. 
4. Site definition can provision multiple webs, but site templates for single web only. 
5. Creating site definition is relatively complex then site template creation.



  • Site Definition Files are on disk, better performance.
  • Site Template Files are in database, less efficient.

Site definition (Advantages):

  • Data is stored directly on the Web servers, so performance is typically better.
  • A higher level of list customization is possible through direct editing of a Schema.xml file.
  • Certain kinds of customization to sites or lists require use of site definitions, such as introducing new file types, defining view styles, or modifying the Edit menu.


Site definition (Disadvantages):

  • Customization of site definition requires more effort than creating custom templates.
  • Editing a site definition after it has been deployed is difficult.
  • Doing anything other than adding code can break existing sites.
  • Users cannot apply a SharePoint theme through a site definition.
  • Users cannot create two lists of the same type with different default content.
  • Customizing site definitions requires access to the file system of the front-end Web server.


Site Templates (Advantages):

  • Custom templates are easy to create.
  • Almost anything that can be done in the user interface can be preserved in the template.
  • Custom templates can be modified without affecting existing sites that have been created from the templates.
  • Custom templates are easy to deploy.


Site Templates (Disadvantages):

  • Custom templates are not created in a development environment.
  • Custom templates are less efficient in large-scale environments.
  • If the site definition on which the custom template is based does not exist on the front-end server or servers, the custom template does not work.

No comments:

Post a Comment