Question

What are the main differences between site definition and site templates? and

When to use both in custom development of sharepoint apps in all object models?

Was it helpful?

Solution

The following is a clarity and brevity comparison between site definition and site templates

Site Definitions

  • Files are on disk, better performance.
  • Highly customizable and extensible
  • Can provision multiple webs.
  • Complex to create
  • Requires admin access to server for deploying.
  • Modifying the site definition after provisioning at least one site from it is not supported and might break existing sites.

Site Templates

  • is a customization applied to a site definition.
  • Files are in database, less efficient.
  • Not easily extensible (You are limited by what UI offers)
  • Can only provision one web
  • Easier to create
  • Installable from a Web UI by site owners.
  • Custom templates can be modified without affecting existing sites that have been created from the templates.

For more details check Difference Between Site Template and Site Definition

When to use both in custom development of SharePoint apps

If I understand the question correctly, unfortunately you can't create a site definition / Site Template in SharePoint apps, because

  • Site definition deployed as a farm solution only.
  • Custom Site templates are not created in a development environment.
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top