Site Definition Versus Site Templates

Sep 24, 2013 at 11:04 PM



Site Definition:

Site definitions consist primarily of multiple XML and ASPX files stored on a front-end web server in folders under the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\SiteTemplates directory.
- Old & Out of Date
- Involves managing of lot of tedious onet.xml and schema.xml files.
- A site definition is installed on file system of web front ends
- A site definition Page and List definition are cached at IIS process startup
 

Custom Site Templates:

Custom web templates are stored in the database—specifically, the sandbox solutions gallery—and are created by using an existing site, with or without its specific content, as a model. This provides a means for reusing sites that you have customized.
 
***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 download the template and upload this to another site collection and can create a site based on this template. Whenever you need a new site you can create it from the site template you have created. This is a good approach if the design is finalized and you want to reuse the same template 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 changes to the work that you did on the original site then 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.
 

Major differences:

  • To create or use a site definition you need server admin access, but site template can install from web UI by site owners.
  • Site definition supports feature stapling, but for site template additional features must be activated in gallery.
  • Site definitions are stored on hard disk, but site templates are stored in content DB.
  • Site definition can provision multiple webs, but site templates are for single web only.
  • Creating site definition is relatively more complex than site template creation.
  • Performance wise Site definitions are better than site templates as files are stored on harddisk
 
Happy Sharepointing !

Please do Share/Like/Comment if this article was helpful.

Found this article by Dhaval Shah valuable? Help by Sharing ...

  • Click on the banners at the top of article or in the right panel to visit my blog's sponsors. They are all hand-picked and are selected based on providing great products and services to the SharePoint community.
  • I’d be very grateful if you’d help it spread by Sharing. Below, you should find links to sharing this article on your favorite social media sites.
Related Posts by Dhaval Shah blog comments powered by Disqus