Site Customization • Two types of building blocks for sites – Sites Definitions – Custom Site Templates • Either type determine the lists, files, Web Parts, Features, or settings with which to provision a new SharePoint site.
Building Blocks • Site definitions consist primarily of multiple XML and ASPX files stored on a front-end Web server • Custom site templates are stored in the database and are created by using an existing site as a model
Site Definition• A family of one or more configurations• Configurations allow you to specify which lists to include in the creation of a site• There are five site definitions natively installed in Windows SharePoint Services• Example: The STS Site Definition – Contains the configurations for Team Site, Blank Site, and Document Workspace – Each configurations specifies the elements from the Site Definition that it will use.• A site is created when a configuration is provisioned.
Custom Template • A custom template is a customization applied to a site or list definition • A site or list customization created using the user interface or SharePoint Designer 2007 • Consists of the difference between the original state of the Web site and the state of the Web site or list at the time that the custom template is generated • Site templates are stored in the Site Template gallery of the top-level site.
Why or When to Use Either • Considerations – Are the changes you need to make simple or complex? – Can you deploy changes to the front- end Web server? • Pros and Cons
Site Definitions: Pros and ConsPros• Data is stored directly on the Web servers• A higher level of list customization is possible• Certain kinds of customization to sites or lists require use of site definitionsCons• Customization of site definition requires more effort than creating custom templates and requires access to the file system of the front- end Web server.• 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.
Custom Templates: Pros and Cons Pros • 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. Cons • 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.
SharePoint Design • Simple Branding vs Custom Site Design