What is the best way for site provisioning ?

Jan 19, 2009 at 5:00 AM

Is it a good practice to create an empty site definition with a feature stapling and create the site provisioning (like provisioning the default.aspx page) through the feature ?

Feb 6, 2009 at 7:32 AM
Yes. It is a good practice and it is exactly what the contoso training mangement RI tries to follow.
Feb 9, 2009 at 8:11 PM
Thank you for all your good answers !

OK, one last question....

I don't understand the "Empty" site definition comcept because I checked the contoso training management RI code and I see that you reference features in the onet.xml file (Site Definition), do we have the same problem of List Definition in a Site Definition with the feature reference (we are stuck with it) ?


    <Configuration ID="0" Name="Training">

      <Lists />

      <Modules />


        <!-- BasicWebParts Feature -->

        <Feature ID="00BFEA71-1C5E-4A24-B310-BA51C3EB7A57"/>

        <!-- Three-state Workflow Feature -->

        <Feature ID="FDE5D850-671E-4143-950A-87B473922DC7"/>

        <!-- ContosoTrainingManageSiteCollection Feature -->

        <Feature ID="9d4c5dae-88a3-4f95-bd08-6ebde74ae266"/>



        <Feature ID="00BFEA71-4EA5-48D4-A4AD-7EA5C011ABE5"/>

        <!-- TeamCollab Feature -->

        <Feature ID="F41CC668-37E5-4743-B4A8-74D1DB3FD8A4"/>

        <!-- MobilityRedirect -->

        <!-- VSeWSS will automatically feature id's for ContoTrainingManagementWeb and auto generated hidden features here! -->




Feb 12, 2009 at 9:24 PM
The term "empty" when used in the context of a site definition means that we aren't defining lists and webpart pages and various site elements in the site definition. We define all those site elements in features and associate those features in the site definition.