views:

227

answers:

2

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
A: 

Also consider the administration of the features. If you're in a large company environment with lots of features being deployed, you'll want to consider breaking things up. It will help with deployment and, if one of those features become wildly popular while the other two are only somewhat popular, it will save you a ton of time with enhancement requests and bug fixes.

CLaRGe
I am specificly looking at features that are inter-dependant. That is without one the other will either not work correctly or have little functional purpose.
Richard Slater
+4  A: 

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.

Corey Roth