Académique Documents
Professionnel Documents
Culture Documents
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no
registration required. Take the 2-minute tour
What is the main differences between site definition and site template?
tagged
sharepoint 14989
A site definition is the basic blueprint for a site, including how it looks, what lists it contains, default
navigational structures, and so on. You normally create a site definition by hand-editing CAML. HR12061301 Software
3 Development Engineer (C#,
WPF/MVVM)
A site template can be created from within the Sharepoint application, and is basically a "diff" between Red Bull Technology
the site definition and any changes made since the site was created. A site template is based on the Milton Keynes, United Kingdom
underlying site definition, which means that if you create a new site from a template, and later change the
underlying site definition, you run the very real risk of irreversibly screwing up your site. Principal Product Manager -
Amazon Instant Video: Playback
A best practice is to configure a minimal site definition that, once created, is never modified again, and Amazon
Seattle, WA / relocation
use site templates to store reusable customizations.
(PHP) Join a startup that is
share | improve this answer answered Dec 8 '10 at 19:35 revolutionising the $33b
Bob Black Signkick
1,382 6 17 London, United Kingdom /
Related
2 How do you create a new
site template for my
sites?
2 SharePoint - Determine
the Site Definition used to
Feature Stapling create a Site Template
Site Definition: Supported (.STP)
1 Site Template: Not supported
1 custom site definition
Multiple webs template wss 3.0
Site Definition: Can provision multiple webs.
Site Template: Can only provision one web. 2 Sharepoint - How to
Complexity agregate Announcements
Site Definition: Complex to create from sub-sites onto main
Site Template: Easier to create site
Permissions
Site Definition: Requires admin access to server for deploying. 0 Sharepoint site template -
Site Template: Installable from a Web UI by site owners. feature scope
Performance 2 Building sites besides
Site Definition: Files are on disk, better performance. sharepoint site template
Site Template: Files are in database, less efficient.
2 How to integrate a feature
share | improve this answer edited May 21 '12 at 12:51 answered May 21 '12 at 12:29 in SharePoint 2010 site
Peter Lang Prasanth KRN template?
23.4k 9 61 93 78 5
0 what is difference
I tried to edit your answer for better readability, but I am not familiar with this topic. Could you please check that between site definition
this is still what you wanted to say? Peter Lang May 21 '12 at 12:52 and web template?
ok good editing but previous also same answer iam giving simple answer finally thanks for editing 0 difference between team
Prasanth KRN May 21 '12 at 12:57 site and community site
and project site
http://stackoverflow.com/questions/4386016/what-is-the-main-differences-between-site-definition-and-site-template 1/5
sharepoint - What is the main differences between site definition and site template? - Stack Overflow 12/28/2013
sharepoint 2013?
1 Unable to create
There are lots of main differences. Depends on what you are looking for: sharepoint site from
migrated site
0 Deciding Between Custom Web Templates and Custom Site Definitions: http://msdn.microsoft.com/en- template(.wsp)
us/library/aa979683.aspx
share | improve this answer answered Dec 8 '10 at 9:47 Hot Network Questions
Madhur Ahuja Trolling homework questions -
9,785 2 12 39 sorting
How do I longest palindrome?
Find five consecutive odd
Your Answer integers such that their sum is
55
more hot questions
question feed
about help badges blog chat data legal privacy policy jobs advertising info mobile contact us feedback
site design / logo 2013 stack exchange inc; user contributions licensed under cc-wiki with attribution required
rev 2013.12.28.1269
http://stackoverflow.com/questions/4386016/what-is-the-main-differences-between-site-definition-and-site-template 2/5
Site Definitions versus Site Templates and deciding on the correct customization approach - Brian Wilson - Site Home - MSDN Blogs 12/28/2013
Sign in
Brian Wilson
Best Practices, advice and guidance on all things related to SharePoint Technologies.
MSDN Blogs > Brian Wilson > Site Definitions versus Site Templates and deciding on the correct Translate This Page
customization approach
Translate this page
Site Definitions versus Site Templates and deciding on the
correct customization approach Sp an ish
Options
Site Definitions Blog Home
A site definition is the core definition of what a site is in SharePoint. About
A site definition is installed on file system of web front ends, located at ..\12\Template\SiteTemplates. This directory Email Blog Author
is language-neutral. Share this
A site definition consists of .aspx pages and .xml files with Collaborative Application Mark-up Language (CAML). RSS for posts
A major benefit is that the Page and List definition is read locally from the file system, not from Content Database. Atom
A site definition Page and List definition are cached at IIS process startup
RSS for comments
Customizations made to site definition are stored in content database, not on the file system. This can be performed
via SharePoint Designer, or when custom site templates are saved.
are developer created Search
Localization: WSS 3.0 supports full site template localization (based on ASP.Net 2.0 via XML files and .ASPX files
pulling strings from RESX files. Therefore solutions can be shipped language packs of resource files. Search MSDN with Bing
Global Template defines commonality across site definitions; it gets called before any other template. It works by
injecting common provisioning content into all new sites. ONET.XML file defines base types, galleries, mobile Search this blog Search all blogs
redirects
Tags
Deployment development
Event Handlers Features field
General How To infrastructure integration
WSS
Site Definitions and Configurations - http://msdn2.microsoft.com/en-us/library/aa978512.aspx Archive
CAML - http://msdn2.microsoft.com/en-us/library/ms462365.aspx
January 2009 (1)
Site Template July 2008 (8)
A site template (*.stp file) is created through the user interface or through implementation of the object model. It is February 2008 (1)
a package containing a set of differences and changes from a base site definition. August 2007 (1)
March 2007 (3)
The site template package is stored as a CAB-based file that can be downloaded or uploaded to site collections by February 2007 (1)
users with the appropriate rights. As before, site templates offer a measure of portability to SharePoint January 2007 (1)
Applications.
It is not as performant as a pure site definition as site definitions are cached on start of IIS on the web front ends
while site templates are stored and hence need to be fetched from the content database and merged with the site
definition code at runtime to render the site.
Also note that if you plan to transfer a site template to separate farm, that the farms have the same versions
installed of SharePoint installed. (hotfixes,etc.) This is due to the dependence site templates have on the original
base site definition they were created from.
When choosing whether to create a site template or a site definition, first consider the following issues:
Are the changes you need to make simple or complex? If, for example, you need to make only minor changes in
http://blogs.msdn.com/b/brianwilson/archive/2008/07/13/site-definitions-versus-site-templates-and-deciding-on-the-correct-customization-approach.aspx 3/5
Site Definitions versus Site Templates and deciding on the correct customization approach - Brian Wilson - Site Home - MSDN Blogs 12/28/2013
the look of certain pages and add a few fields in particular lists, you should create a custom site template.
However, if you need to create new content types, add new Web Part definitions, and significantly restructure sites,
you should create a custom site definition.
Can you deploy changes to the front-end Web server? If you do not have access to the file system of the
computers running Windows SharePoint Services, you have no choice but to create a custom site template.
Custom site definitions hold 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 Edit menu.
Custom templates hold the following advantages over customization of site definitions:
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.
Comments
You can create custom templates in development . You need to deploy them see example of how to
deploy a list template here
http://www.sharepointblogs.com/tonstegeman/archive/2007/07/10/deploy-a-sharepoint-list-template-
to-sharepoint-mysites.aspx
As part of SharePoint rollout in our company, we are in the process of developing custom site
definitions/templates for team sites, project sites etc
We understood that new site definitions/templates required configuration (adding new views to lists,
adding webparts to pages etc) can be built in three ways. They are
Custom site template (do all the required configuration in a site and store it as .stp file to be used to
recreate sites)
Custom site definition (do all the required configuration in onet.xml of a custom site definition in 12
hive)
Feature ( do all the required configuration in a dll through object model and attach the dll to Feature, to
http://blogs.msdn.com/b/brianwilson/archive/2008/07/13/site-definitions-versus-site-templates-and-deciding-on-the-correct-customization-approach.aspx 4/5
Site Definitions versus Site Templates and deciding on the correct customization approach - Brian Wilson - Site Home - MSDN Blogs 12/28/2013
be called when a new site is created using Feature site template association)
Instead of preferring option 2. above, we are leaning more towards option 3. (actually combination of 2.
and 3. with bare bones site definiton) as this would help change the site definition ( by changing the dll)
without touching the site definition files in 12 hive ( best practice from MS is not to touch the site
definition files in 12 hive once site collections are created). This would help us in the version
management of site definitions.
But while preferring option 3., we are facing some challenges in doing the required configuration
(changing some webpart settings) through code.
So, do you have any idea if combination of 1. and 3. will be robust enough? By combination, I mean
doing most of the changes in the custom template (option 1. above) and include some changes into
Feature (option 3.) which are not doable through custom template.
From the best practice perspective, do you suggest the above combination of 1. and 3. or you think it is
better to go with 2. and 3. (with all the configuration done through code and just a bare bones site
definition in 12 hive this would require more time to resolve our challenges but will prefer if this is the
best way to go.)?
With Regards,
Chalapathi
I agree with you that site definition are harder to develop but I do not agree that it is difficult to change
after it has been deployed. I say this mainly thinking at feature stapling (I have seen on the MS site that
changing site definitions already in use is not supported fo feature stapling is the only solution left :)).
I always leave the onet.xml file blank and I only set the list of site/web features to be activated by default.
By doing this I have never seen the issue you mentioned about 2 lists of the same type (I have never tried
using SharePoint themes directly in the site definition, but I think it should be possible).
- you cannot create a site template from a publising site (actually it works, if you use the correct Url but I
think it is not supported, the link to create a site template is removed in the site admin page)
- you cannot create a site template for the root site of a site collection (at least I haven't found a way to
do it)
- using site templates require extra work when working with multiple site collection/web application
(you have to manually/automatically deploy the .stp files in the gallery)
Leave a Comment
Name
Comment
Post
2013 Microsoft Corporation. Terms of Use Trademarks Privacy & Cookies Report Abuse 5.6.426.415
http://blogs.msdn.com/b/brianwilson/archive/2008/07/13/site-definitions-versus-site-templates-and-deciding-on-the-correct-customization-approach.aspx 5/5