I received a question concerning the use of the 'stapler feature' for activating features versus the activation of features within the site definition (in the onet.xml). What is better and why choose the one or the other?
In my opinion, it is better to activate as many features in the site definition, as far as possible. The difference between them is the timing. When using the site definition, the features are activated during the site(collection) creation. If you want to deploy page layouts or site columns for example, you want to deploy them in the site collection before applying the site template, so you can use them directly in the (sub)sites.
When activating in the stapler feature, the features are activated after the site is created. This means that the site columns etc. become available just after the creation of the site(collection). If you want the features during the site creation, it is better to activate the features in the definition.
In some cases however, you must use the stapler feature. If you want to activate a feature that is dependent on another feature in the same scope (web, site), there is a chance that it activates the features in the wrong order. For example, you have a feature that creates a list in the site and one that adds a content type to the new list. In this case it can occur that the second feature will be activated before the list is created.. with an error as a result. The order of activation seems to be quite random, so if you use a stapler feature, you are sure the list is already created when you activate the second feature.
There is another reason to use the stapler feature, which is when you want to activate a feature on a site definition that is already in production, or to add it on a default site definition (MySite). It is not supported to change the site definition after is it being used in production, so you cannot change it. The stapler feature is here the only (good) option to use.
Also check out the following postings form more info: