Logo 
Search:

Sharepoint Articles

Submit Article
Home » Articles » Sharepoint » GeneralRSS Feeds

Site definition and site templates

Posted By: Destin Joy     Category: Sharepoint     Views: 73000

In this article I am describing about the difference between Site definition and site template. Many people asked me in which situation we should go with Site definition and site template. All these questions will be answered in this article.

Site Template

 

The first option for getting the SharePoint Designer changes beyond the current site is to take the site you have modified with SharePoint designer and save it as a template. You can down load the template and upload this to another site collection and can create Site based on this template. Whenever you need a new site you can create it from the site template you have created. This is good approach if the design is finalized and you want to reuse the same in different site collections. But keep in mind you can't go back and apply the changes after the site is created. If you make any change the work that you did on the original site those changes won't be reflected across the other SharePoint sites that were created from the same template This is because each page exists separately in the SharePoint database. So site templates solve the problem of getting SharePoint Designer changes into multiple sites but without the ability to adapt to changes in the future. Once the design is done we have to go to each site then do the same changes we want.

 

Site Definitions

This approach solves the problem of site templates .Here changes can be affected to them after they have been created. Site definitions exist on the file system of each of the front end web server .But as I mentioned earlier site templates exist in the content database. Each site which is created from the site definition doesn't make a copy of the page in the content database; but it stores a pointer to the site definition file. When page on the file system changes it changes all of the references in the database thus solving the problem of making changes to existing branding or other functionalities. Site Definitions are stored on the hard drive of the SharePoint front end servers. They are used by the SharePoint application to generate the sites. Site Templates are created by users as a copy of a site they have configured and modified so that they do not have to recreate lists, libraries, views and columns every time they need a new instance of a site.

In order to create a site definition, we should first have to get the changes to the files that we want into files. We can do this from SharePoint Designer by selecting Save As and pointing to a directory. Now you can  create the support files for the site definition including the ONET.XML file which tell how the site definition is used, and the WEBTEMP.XML file which makes the site definition show up as an option. Better you start with a copy of the STS site definition that comes with SharePoint and make your changes there rather than starting from scratch.

So in nutshell

1.      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

 

Share: 


Didn't find what you were looking for? Find more on Site definition and site templates Or get search suggestion and latest updates.

Destin Joy
Destin Joy author of Site definition and site templates is from Pathanamthitta, India. Destin Joy says

 Hello Everyone,

I am Destin Joy from India I have MCPD in SharePoint 2010, MCTS SharePoint 2010 application development and MCTS in SharePoint 2007. I am mostly working in  core part of SharePoint (2010-2007) and passionate about new Microsoft technologies. Born and brought up in Kerala You can reach me  @ Destin.Joy@hotmail.com

 

 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!