Tuesday, June 30, 2009

SharePoint - It's all about making the right choices and decisions - When to use custom site definitions.

This is the third posting about making the correct design decisions when implementing SharePoint. It's about site definition vs site templates.

I strongly believe that there are a couple of  reasons for using custom site definitions:

  1. Better overall performance of using site definitions instead of site templates for creating sites
  2. More control and flexibility in building a specific solution. One thing to keep in mind though is to keep your custom site definitions as minimal as possible and to use the SharePoint Features framework to add functionality.
  3. Site templates are basically black boxes where you have limited control over the way that they are working - so when you get into trouble you're stuck.
  4. It is easier to add additional functionality to site which are developed using a site definition in contrast with these built using a site template.

The main reason for choosing site templates is that overall it takes less effort to create a site template. You can just click everything together and use the Save site as template option. Another reason would be that you can change a site template without affecting existing sites (allthough this might be a disadvantage as well).

Some extra info: Site definitions versus site templates and deciding on the correct customization approach . On a similar note this same post from  Eric - The great debate: SharePoint Designer vs custom site definitions.

Previous postings:


Brian Farnhill said...

I couldn't agree more - I know that a lot of people seem to fear Site Definitions because they are more work, but when it comes to making very specific solutions and then applying updates later on you just can't beat it. Plus once you have done a couple they are pretty easy to put together as well.

Brian L Bedard said...

I have two posts dedicated to this topic. One is how to get around the dreaded (you updated the site definition, now your existing webs are broken!) error. I also mentioned the VERY blank site definition and included comments on how to make it not so blank.