Before going into direct comparison, let me define both:
Site Templates : Are snapshots of sites at a point in time. When a user customizes a site from the UI or SPD, the custom template consists of the difference between the original state of the site (determined by its definition) and the state of the site or list when the custom template is generated.
Custom templates remain tied to a particular site definition (for example, the site definition for SharePoint Web sites or Meeting Workspace Web sites), so that if the site definition is not present or is changed, the custom template cannot work.
Site Definitions : As the name implies, A Site definition is "core definition of a site”. Each site definition emerges through a combination of files that are placed in the 12 hive of WFE during installation of SharePoint. Site definition files include .xml, .aspx, .ascx, and .master page files, as well as document template files (.dot, .htm, and so on), and content files (.gif, .doc, and so on).
Site Templates : Are snapshots of sites at a point in time. When a user customizes a site from the UI or SPD, the custom template consists of the difference between the original state of the site (determined by its definition) and the state of the site or list when the custom template is generated.
Custom templates remain tied to a particular site definition (for example, the site definition for SharePoint Web sites or Meeting Workspace Web sites), so that if the site definition is not present or is changed, the custom template cannot work.
Site Definitions : As the name implies, A Site definition is "core definition of a site”. Each site definition emerges through a combination of files that are placed in the 12 hive of WFE during installation of SharePoint. Site definition files include .xml, .aspx, .ascx, and .master page files, as well as document template files (.dot, .htm, and so on), and content files (.gif, .doc, and so on).
Site Definitions
|
Site Templates
|
Files are on disk, better performance. | Files are in database, less efficient. |
Highly customizable and extensible (XML and .NET code is much more flexible than UI) | Not easily extensible (You are limited by what UI offers) |
Can provision multiple webs * | Can only provision one web |
Complex to create | Easier to create |
Requires admin access to server for deploying. | Installable from a Web UI by site owners. |
Modifying the site definition after provisioning at least one site from it is not supported and might break existing sites. | Custom templates can be modified without affecting existing sites that have been created from the templates(**). |
Pros and Cons
Customization of site definitions holds the following advantages over custom templates:- 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 drop-down Edit menu.
- Customization of site definition requires more effort than creating custom templates.
- It is difficult to edit a site definition after it has been deployed.
- 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.
- 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.
- Custom templates are not created in a development environment.
- They 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 will not work.
No comments:
Post a Comment