R – One Sharepoint Feature or many inter-dependant features

mosssharepointsharepoint-2007

I have a small Sharepoint Feature project in VS2008 with STSDev 2008 which comprises of a WebPart, a List and a List Instance (of the aforementioned List). The WebPart depends on the existance of the List as does the List Instance.

Would I be better creating one feature that deployed all three components, or packaging up the three components as individual features and creating feature dependancies in the WebPart and List Instance upon the List?

I can see several advantages and disadvantages:

Pro:

  • simplified testing as the list can be tested seperatly from the WebPart and Instance
  • more extensable as further features can be added that depend on up-level features
  • more efficent, only activate the features you need

Con:

  • increased development time to create features
  • development environment dosn't really allow you to split up features except for as different projects
  • could clutter the Site Features page in Site Settings

Best Answer

I would probably split them out into multiple features so that you can updat ethem seperately if need be. You could always create a parent feature which has ActivationDependencies on the child features. If you mark the child features hidden, the parent feature will automatically activate the child features and they won't clutter up your features page.

Related Topic