Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

There have been several questions asked on this site regarding the best way to provision sites and lists (definition schemas vs. templates vs. the object model vs. the web interface vs. provisioning providers). I have even responded to some of them.

http://www.sharepointoverflow.com/questions/4275/custom-site-definition-to-define-a-custom-site-with-a-subsite

http://www.sharepointoverflow.com/questions/4177/best-way-to-build-out-and-configure-multiple-lists

http://www.sharepointoverflow.com/questions/171/when-to-use-custom-site-definitions-and-not

There are a few rules of thumb to go by (resources, permissions, ease of deployment, granularity of control). One thing that has to be considered, though, is how do you propogate changes to a site definition to the sites that have been created from it. Changes to web templates only affect new sites that are created from them. My understanding was that this is not the case with site definition schemas (and list definition schemas). I understand that you can only add to a definition once a site has been created from it or the sites will break, but I saw the note on this page in the MSDN library yesterday and it concerned me: http://msdn.microsoft.com/en-us/library/ms434313.aspx

We rely pretty heavily on the object model to provision modification to sites once they have been created. At the same time, we have been fortunate to not have had many major changes to our site definitions post-production, but that won't last forever.

There is a blog post at http://mymemorysucks.wordpress.com/2009/02/25/site-definitions-vs-site-templates-and-site-provisioning-providers/ that makes a case for always using a provisioning provider over site definitions and templates, but I get mixed signals because the Microsoft developer exams seemed put a lot of weight on site definitions and templates.

So, what are the best practices for modifying your sites/lists after they have been created and are in production? How do ISV's, for example, handle upgrades to their SharePoint based software?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Upgrading artifacts depends on the type of artifact in question, and depending on the platform (MOSS vs SP2010).

In SharePoint 2010 question the story is different than in SharePoint 2007, since you have feature upgrade, both declaratively and programmaticly (feature upgrade event handler with parameters set declaratively). Further info regarding feature upgrade can be found in my article on the subject in the DIWUG SharePoint eMagazine http://andersrask.spoint.me/2010/06/02/code-samples-from-diwug-article

As the article you refer to mentions, changing the manifests of a site definition after the site is created, isnt supported. This is why many developers (as mentioned in some of the threads you link to) prefer to keep their site definitions minimal, and instead put as much of the functionality into features and staple them on your site definition.

Provisioning providers are helpful when you want to put "finishing touches" on your site after it was created. This could include setting policies, creating sub sites, setting default pages, activating features, page layout restrictions, configuring web parts etc.

share|improve this answer
    
Thanks Anders. That's good stuff. –  Rob Wilson Jul 27 '10 at 1:27
add comment

This is (as I'm sure you're aware) a huge, ongoing discussion point that (from whenever I see it) always ends up in the classic consultant response "It depends on your requirements".

I think once a site has been provisioned as per site template it's quite safe to modify the XML schemas as the provisioned content is then stored in the content database, however it may produce issues if yoour information workers then decide to create site templates (STP files) from the site definitions.

share|improve this answer
    
Thanks for the thoughtful response, James. You're right, I've wondered for some time why there does not seem to be a standard for this. It doesn't seem it should be as complicated as it is, but I hadn't thought of it from the angle that users can change site/list instances too. I guess that's the kind of thing that makes this more challenging then updating, say, a SQL Server schema. –  Rob Wilson Jul 27 '10 at 1:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.