A list definition defines a schema for a SharePoint list. It contains information on what views are being used, which columns and content types are being used, and other metadata information.
A list template can either be created by end users through the SharePoint user interface using an existing list as a pattern or using an existing list instance. If based on a user-created list it is called a custom list template. A custom list template includes everything that defines the list, including list columns and site columns used by the list, content types used by the list, views defined for the list, and so on.
A list template may sound like a list definition but they are effectively the same thing, a pattern for a SharePoint list. They differ mainly in how they are created:
- A list templates are created in SharePoint or SharePoint designer.
- A list definitions in Visual Studio.
A list instance is an instance of a specific SharePoint list definition or list template. All of its data is stored in the relevant content database. Typically a list in SharePoint used by end users to enter and view data and it is based on either a list template or list definition.
The ListTemplate element has two attributes for type: Type and BaseType. The Type attribute specifies a unique identifier for the list definition, and the BaseType attribute identifies the base list type for the list definition and corresponds to the Type value that is specified for one of the base list types that are defined in the global Onet.xml file.
• A site definition is the core definition of what a site is in SharePoint.
• A site definition is installed on file system of web front ends, located at ..\12\Template\SiteTemplates. This directory is language-neutral.
• A site definition consists of .aspx pages and .xml files with Collaborative Application Mark-up Language (CAML).
• A major benefit is that the Page and List definition is read locally from the file system, not from Content Database.
• A site template (*.stp file) is created through the user interface or through implementation of the object model.
• The site template package is a package containing a set of differences and changes from a base site definition.
• The site template package is stored as a CAB-based file that can be downloaded or uploaded to site collections by users with the appropriate rights.
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.